[spirv] Support `i8` and `u8` in `subgroupMatrixLoad` This patch supports the overloads of `subgroupMatrixLoad()` and with subgroup matrices using `i8` and `u8` as elements and `array<i32>` or `array<u32>`. Bug: 348702031, 403609083 Test: tint_unittests Change-Id: I73e66049205c4421a4a35c3ca9127a6fd4c00e24 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/246796 Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
diff --git a/src/tint/lang/spirv/intrinsic/data.cc b/src/tint/lang/spirv/intrinsic/data.cc index d38e018..f669e08 100644 --- a/src/tint/lang/spirv/intrinsic/data.cc +++ b/src/tint/lang/spirv/intrinsic/data.cc
@@ -2195,87 +2195,95 @@ /* [896] */ MatcherIndex(14), /* [897] */ MatcherIndex(31), /* [898] */ MatcherIndex(8), - /* [899] */ MatcherIndex(1), - /* [900] */ MatcherIndex(15), + /* [899] */ MatcherIndex(10), + /* [900] */ MatcherIndex(14), /* [901] */ MatcherIndex(31), /* [902] */ MatcherIndex(8), - /* [903] */ MatcherIndex(10), - /* [904] */ MatcherIndex(15), + /* [903] */ MatcherIndex(11), + /* [904] */ MatcherIndex(14), /* [905] */ MatcherIndex(31), /* [906] */ MatcherIndex(8), - /* [907] */ MatcherIndex(11), + /* [907] */ MatcherIndex(1), /* [908] */ MatcherIndex(15), - /* [909] */ MatcherIndex(26), - /* [910] */ MatcherIndex(0), - /* [911] */ MatcherIndex(1), - /* [912] */ MatcherIndex(26), - /* [913] */ MatcherIndex(2), + /* [909] */ MatcherIndex(31), + /* [910] */ MatcherIndex(8), + /* [911] */ MatcherIndex(10), + /* [912] */ MatcherIndex(15), + /* [913] */ MatcherIndex(31), /* [914] */ MatcherIndex(8), - /* [915] */ MatcherIndex(26), - /* [916] */ MatcherIndex(3), - /* [917] */ MatcherIndex(8), - /* [918] */ MatcherIndex(26), + /* [915] */ MatcherIndex(11), + /* [916] */ MatcherIndex(15), + /* [917] */ MatcherIndex(26), + /* [918] */ MatcherIndex(0), /* [919] */ MatcherIndex(1), - /* [920] */ MatcherIndex(8), - /* [921] */ MatcherIndex(26), - /* [922] */ MatcherIndex(2), - /* [923] */ MatcherIndex(0), - /* [924] */ MatcherIndex(26), - /* [925] */ MatcherIndex(0), - /* [926] */ MatcherIndex(7), - /* [927] */ MatcherIndex(26), - /* [928] */ MatcherIndex(3), - /* [929] */ MatcherIndex(0), - /* [930] */ MatcherIndex(26), - /* [931] */ MatcherIndex(3), - /* [932] */ MatcherIndex(1), - /* [933] */ MatcherIndex(26), - /* [934] */ MatcherIndex(3), - /* [935] */ MatcherIndex(2), - /* [936] */ MatcherIndex(26), - /* [937] */ MatcherIndex(4), - /* [938] */ MatcherIndex(0), - /* [939] */ MatcherIndex(26), - /* [940] */ MatcherIndex(4), - /* [941] */ MatcherIndex(1), - /* [942] */ MatcherIndex(26), - /* [943] */ MatcherIndex(4), - /* [944] */ MatcherIndex(2), - /* [945] */ MatcherIndex(26), - /* [946] */ MatcherIndex(4), - /* [947] */ MatcherIndex(3), - /* [948] */ MatcherIndex(26), - /* [949] */ MatcherIndex(0), - /* [950] */ MatcherIndex(2), - /* [951] */ MatcherIndex(26), + /* [920] */ MatcherIndex(26), + /* [921] */ MatcherIndex(2), + /* [922] */ MatcherIndex(8), + /* [923] */ MatcherIndex(26), + /* [924] */ MatcherIndex(3), + /* [925] */ MatcherIndex(8), + /* [926] */ MatcherIndex(26), + /* [927] */ MatcherIndex(1), + /* [928] */ MatcherIndex(8), + /* [929] */ MatcherIndex(26), + /* [930] */ MatcherIndex(2), + /* [931] */ MatcherIndex(0), + /* [932] */ MatcherIndex(26), + /* [933] */ MatcherIndex(0), + /* [934] */ MatcherIndex(7), + /* [935] */ MatcherIndex(26), + /* [936] */ MatcherIndex(3), + /* [937] */ MatcherIndex(0), + /* [938] */ MatcherIndex(26), + /* [939] */ MatcherIndex(3), + /* [940] */ MatcherIndex(1), + /* [941] */ MatcherIndex(26), + /* [942] */ MatcherIndex(3), + /* [943] */ MatcherIndex(2), + /* [944] */ MatcherIndex(26), + /* [945] */ MatcherIndex(4), + /* [946] */ MatcherIndex(0), + /* [947] */ MatcherIndex(26), + /* [948] */ MatcherIndex(4), + /* [949] */ MatcherIndex(1), + /* [950] */ MatcherIndex(26), + /* [951] */ MatcherIndex(4), /* [952] */ MatcherIndex(2), - /* [953] */ MatcherIndex(7), - /* [954] */ MatcherIndex(16), - /* [955] */ MatcherIndex(8), - /* [956] */ MatcherIndex(16), + /* [953] */ MatcherIndex(26), + /* [954] */ MatcherIndex(4), + /* [955] */ MatcherIndex(3), + /* [956] */ MatcherIndex(26), /* [957] */ MatcherIndex(0), - /* [958] */ MatcherIndex(16), - /* [959] */ MatcherIndex(10), - /* [960] */ MatcherIndex(16), - /* [961] */ MatcherIndex(11), + /* [958] */ MatcherIndex(2), + /* [959] */ MatcherIndex(26), + /* [960] */ MatcherIndex(2), + /* [961] */ MatcherIndex(7), /* [962] */ MatcherIndex(16), - /* [963] */ MatcherIndex(1), - /* [964] */ MatcherIndex(34), + /* [963] */ MatcherIndex(8), + /* [964] */ MatcherIndex(16), /* [965] */ MatcherIndex(0), - /* [966] */ MatcherIndex(17), - /* [967] */ MatcherIndex(0), - /* [968] */ MatcherIndex(21), - /* [969] */ MatcherIndex(0), - /* [970] */ MatcherIndex(25), - /* [971] */ MatcherIndex(0), - /* [972] */ MatcherIndex(37), - /* [973] */ MatcherIndex(36), - /* [974] */ MatcherIndex(38), - /* [975] */ MatcherIndex(41), - /* [976] */ MatcherIndex(40), - /* [977] */ MatcherIndex(9), - /* [978] */ MatcherIndex(39), - /* [979] */ MatcherIndex(42), + /* [966] */ MatcherIndex(16), + /* [967] */ MatcherIndex(10), + /* [968] */ MatcherIndex(16), + /* [969] */ MatcherIndex(11), + /* [970] */ MatcherIndex(16), + /* [971] */ MatcherIndex(1), + /* [972] */ MatcherIndex(34), + /* [973] */ MatcherIndex(0), + /* [974] */ MatcherIndex(17), + /* [975] */ MatcherIndex(0), + /* [976] */ MatcherIndex(21), + /* [977] */ MatcherIndex(0), + /* [978] */ MatcherIndex(25), + /* [979] */ MatcherIndex(0), + /* [980] */ MatcherIndex(37), + /* [981] */ MatcherIndex(36), + /* [982] */ MatcherIndex(38), + /* [983] */ MatcherIndex(41), + /* [984] */ MatcherIndex(40), + /* [985] */ MatcherIndex(9), + /* [986] */ MatcherIndex(39), + /* [987] */ MatcherIndex(42), }; static_assert(MatcherIndicesIndex::CanIndex(kMatcherIndices), @@ -2375,7 +2383,7 @@ { /* [18] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(915), + /* matcher_indices */ MatcherIndicesIndex(923), }, { /* [19] */ @@ -2435,7 +2443,7 @@ { /* [30] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [31] */ @@ -2495,7 +2503,7 @@ { /* [42] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [43] */ @@ -2555,7 +2563,7 @@ { /* [54] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [55] */ @@ -2585,7 +2593,7 @@ { /* [60] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(912), + /* matcher_indices */ MatcherIndicesIndex(920), }, { /* [61] */ @@ -2645,7 +2653,7 @@ { /* [72] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [73] */ @@ -2825,7 +2833,7 @@ { /* [108] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(915), + /* matcher_indices */ MatcherIndicesIndex(923), }, { /* [109] */ @@ -2875,7 +2883,7 @@ { /* [118] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [119] */ @@ -2925,7 +2933,7 @@ { /* [128] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [129] */ @@ -2975,7 +2983,7 @@ { /* [138] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [139] */ @@ -3000,7 +3008,7 @@ { /* [143] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(912), + /* matcher_indices */ MatcherIndicesIndex(920), }, { /* [144] */ @@ -3025,7 +3033,7 @@ { /* [148] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(915), + /* matcher_indices */ MatcherIndicesIndex(923), }, { /* [149] */ @@ -3075,7 +3083,7 @@ { /* [158] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [159] */ @@ -3125,7 +3133,7 @@ { /* [168] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [169] */ @@ -3175,7 +3183,7 @@ { /* [178] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [179] */ @@ -3225,7 +3233,7 @@ { /* [188] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [189] */ @@ -3275,7 +3283,7 @@ { /* [198] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [199] */ @@ -3300,7 +3308,7 @@ { /* [203] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [204] */ @@ -3325,7 +3333,7 @@ { /* [208] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(912), + /* matcher_indices */ MatcherIndicesIndex(920), }, { /* [209] */ @@ -3375,7 +3383,7 @@ { /* [218] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [219] */ @@ -3425,7 +3433,7 @@ { /* [228] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [229] */ @@ -3475,7 +3483,7 @@ { /* [238] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [239] */ @@ -3525,7 +3533,7 @@ { /* [248] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [249] */ @@ -3550,7 +3558,7 @@ { /* [253] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(912), + /* matcher_indices */ MatcherIndicesIndex(920), }, { /* [254] */ @@ -3600,7 +3608,7 @@ { /* [263] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [264] */ @@ -3625,7 +3633,7 @@ { /* [268] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(918), + /* matcher_indices */ MatcherIndicesIndex(926), }, { /* [269] */ @@ -3675,7 +3683,7 @@ { /* [278] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [279] */ @@ -3725,7 +3733,7 @@ { /* [288] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [289] */ @@ -3750,7 +3758,7 @@ { /* [293] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [294] */ @@ -3770,7 +3778,7 @@ { /* [297] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(897), + /* matcher_indices */ MatcherIndicesIndex(905), }, { /* [298] */ @@ -3795,7 +3803,7 @@ { /* [302] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(901), + /* matcher_indices */ MatcherIndicesIndex(909), }, { /* [303] */ @@ -3820,7 +3828,7 @@ { /* [307] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(905), + /* matcher_indices */ MatcherIndicesIndex(913), }, { /* [308] */ @@ -3910,7 +3918,7 @@ { /* [325] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [326] */ @@ -4150,7 +4158,7 @@ { /* [373] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [374] */ @@ -4230,7 +4238,7 @@ { /* [389] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [390] */ @@ -4250,7 +4258,7 @@ { /* [393] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(912), + /* matcher_indices */ MatcherIndicesIndex(920), }, { /* [394] */ @@ -4270,7 +4278,7 @@ { /* [397] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(915), + /* matcher_indices */ MatcherIndicesIndex(923), }, { /* [398] */ @@ -4310,7 +4318,7 @@ { /* [405] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [406] */ @@ -4350,7 +4358,7 @@ { /* [413] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [414] */ @@ -4390,7 +4398,7 @@ { /* [421] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [422] */ @@ -4430,7 +4438,7 @@ { /* [429] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [430] */ @@ -4470,7 +4478,7 @@ { /* [437] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [438] */ @@ -4490,7 +4498,7 @@ { /* [441] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [442] */ @@ -4510,7 +4518,7 @@ { /* [445] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(912), + /* matcher_indices */ MatcherIndicesIndex(920), }, { /* [446] */ @@ -4550,7 +4558,7 @@ { /* [453] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [454] */ @@ -4590,7 +4598,7 @@ { /* [461] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [462] */ @@ -4630,7 +4638,7 @@ { /* [469] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [470] */ @@ -4670,7 +4678,7 @@ { /* [477] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [478] */ @@ -4690,7 +4698,7 @@ { /* [481] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(912), + /* matcher_indices */ MatcherIndicesIndex(920), }, { /* [482] */ @@ -4730,7 +4738,7 @@ { /* [489] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [490] */ @@ -4770,7 +4778,7 @@ { /* [497] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [498] */ @@ -4810,7 +4818,7 @@ { /* [505] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [506] */ @@ -4830,7 +4838,7 @@ { /* [509] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [510] */ @@ -4850,7 +4858,7 @@ { /* [513] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(918), + /* matcher_indices */ MatcherIndicesIndex(926), }, { /* [514] */ @@ -4890,7 +4898,7 @@ { /* [521] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [522] */ @@ -4930,7 +4938,7 @@ { /* [529] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [530] */ @@ -4950,7 +4958,7 @@ { /* [533] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [534] */ @@ -4990,7 +4998,7 @@ { /* [541] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [542] */ @@ -5030,7 +5038,7 @@ { /* [549] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [550] */ @@ -5055,7 +5063,7 @@ { /* [554] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [555] */ @@ -5075,7 +5083,7 @@ { /* [558] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(958), + /* matcher_indices */ MatcherIndicesIndex(966), }, { /* [559] */ @@ -5095,7 +5103,7 @@ { /* [562] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(960), + /* matcher_indices */ MatcherIndicesIndex(968), }, { /* [563] */ @@ -5115,7 +5123,7 @@ { /* [566] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [567] */ @@ -5135,7 +5143,7 @@ { /* [570] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(958), + /* matcher_indices */ MatcherIndicesIndex(966), }, { /* [571] */ @@ -5155,7 +5163,7 @@ { /* [574] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(960), + /* matcher_indices */ MatcherIndicesIndex(968), }, { /* [575] */ @@ -5175,7 +5183,7 @@ { /* [578] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [579] */ @@ -5195,7 +5203,7 @@ { /* [582] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(958), + /* matcher_indices */ MatcherIndicesIndex(966), }, { /* [583] */ @@ -5215,7 +5223,7 @@ { /* [586] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(960), + /* matcher_indices */ MatcherIndicesIndex(968), }, { /* [587] */ @@ -5235,7 +5243,7 @@ { /* [590] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(954), + /* matcher_indices */ MatcherIndicesIndex(962), }, { /* [591] */ @@ -5255,7 +5263,7 @@ { /* [594] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(958), + /* matcher_indices */ MatcherIndicesIndex(966), }, { /* [595] */ @@ -5275,7 +5283,7 @@ { /* [598] */ /* usage */ core::ParameterUsage::kTexel, - /* matcher_indices */ MatcherIndicesIndex(960), + /* matcher_indices */ MatcherIndicesIndex(968), }, { /* [599] */ @@ -5295,12 +5303,12 @@ { /* [602] */ /* usage */ core::ParameterUsage::kOffset, - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), }, { /* [603] */ /* usage */ core::ParameterUsage::kCount, - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), }, { /* [604] */ @@ -5315,12 +5323,12 @@ { /* [606] */ /* usage */ core::ParameterUsage::kOffset, - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), }, { /* [607] */ /* usage */ core::ParameterUsage::kCount, - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), }, { /* [608] */ @@ -5345,17 +5353,17 @@ { /* [612] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(847), + /* matcher_indices */ MatcherIndicesIndex(897), }, { /* [613] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(852), + /* matcher_indices */ MatcherIndicesIndex(533), }, { /* [614] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(842), + /* matcher_indices */ MatcherIndicesIndex(533), }, { /* [615] */ @@ -5365,532 +5373,532 @@ { /* [616] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(861), + /* matcher_indices */ MatcherIndicesIndex(901), }, { /* [617] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(8), + /* matcher_indices */ MatcherIndicesIndex(533), }, { /* [618] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(8), + /* matcher_indices */ MatcherIndicesIndex(533), }, { /* [619] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(533), + }, + { + /* [620] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(847), + }, + { + /* [621] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(852), + }, + { + /* [622] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(842), + }, + { + /* [623] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(533), + }, + { + /* [624] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(861), + }, + { + /* [625] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(8), + }, + { + /* [626] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(8), + }, + { + /* [627] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(235), }, { - /* [620] */ + /* [628] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(8), }, { - /* [621] */ + /* [629] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [622] */ + /* [630] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(45), }, { - /* [623] */ + /* [631] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(31), }, { - /* [624] */ + /* [632] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [625] */ + /* [633] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(66), }, { - /* [626] */ + /* [634] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(649), }, { - /* [627] */ + /* [635] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [628] */ + /* [636] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(166), }, { - /* [629] */ + /* [637] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(649), }, { - /* [630] */ + /* [638] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [631] */ + /* [639] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(244), }, { - /* [632] */ + /* [640] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(31), }, { - /* [633] */ + /* [641] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [634] */ + /* [642] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(1), }, { - /* [635] */ + /* [643] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(42), }, { - /* [636] */ + /* [644] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [637] */ + /* [645] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(12), }, { - /* [638] */ + /* [646] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(659), }, { - /* [639] */ + /* [647] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [640] */ + /* [648] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(253), }, { - /* [641] */ + /* [649] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(42), }, { - /* [642] */ + /* [650] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [643] */ + /* [651] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(514), }, { - /* [644] */ + /* [652] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(52), }, { - /* [645] */ + /* [653] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [646] */ + /* [654] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(523), }, { - /* [647] */ + /* [655] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(52), }, { - /* [648] */ + /* [656] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [649] */ + /* [657] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(532), }, { - /* [650] */ + /* [658] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(52), }, { - /* [651] */ + /* [659] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [652] */ + /* [660] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(541), }, { - /* [653] */ + /* [661] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(53), }, { - /* [654] */ + /* [662] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [655] */ + /* [663] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(550), }, { - /* [656] */ + /* [664] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(53), }, { - /* [657] */ + /* [665] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [658] */ + /* [666] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(559), }, { - /* [659] */ + /* [667] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(53), }, { - /* [660] */ + /* [668] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [661] */ + /* [669] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(568), }, { - /* [662] */ + /* [670] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(669), }, { - /* [663] */ + /* [671] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [664] */ + /* [672] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(577), }, { - /* [665] */ + /* [673] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(669), }, { - /* [666] */ + /* [674] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [667] */ + /* [675] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(586), }, { - /* [668] */ + /* [676] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(669), }, { - /* [669] */ + /* [677] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [670] */ + /* [678] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(595), }, { - /* [671] */ + /* [679] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(669), }, { - /* [672] */ + /* [680] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [673] */ + /* [681] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(604), }, { - /* [674] */ + /* [682] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(669), }, { - /* [675] */ + /* [683] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [676] */ + /* [684] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(613), }, { - /* [677] */ + /* [685] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(669), }, { - /* [678] */ + /* [686] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [679] */ + /* [687] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(125), }, { - /* [680] */ + /* [688] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(2), }, { - /* [681] */ + /* [689] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [682] */ + /* [690] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(125), }, { - /* [683] */ + /* [691] */ /* usage */ core::ParameterUsage::kCoords, - /* matcher_indices */ MatcherIndicesIndex(912), + /* matcher_indices */ MatcherIndicesIndex(920), }, { - /* [684] */ + /* [692] */ /* usage */ core::ParameterUsage::kImageOperands, /* matcher_indices */ MatcherIndicesIndex(533), }, { - /* [685] */ - /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(858), - }, - { - /* [686] */ - /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(43), - }, - { - /* [687] */ - /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(43), - }, - { - /* [688] */ - /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(858), - }, - { - /* [689] */ - /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(909), - }, - { - /* [690] */ - /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(909), - }, - { - /* [691] */ - /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(948), - }, - { - /* [692] */ - /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(924), - }, - { /* [693] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(909), + /* matcher_indices */ MatcherIndicesIndex(858), }, { /* [694] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(909), + /* matcher_indices */ MatcherIndicesIndex(43), }, { /* [695] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(939), + /* matcher_indices */ MatcherIndicesIndex(43), }, { /* [696] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(942), + /* matcher_indices */ MatcherIndicesIndex(858), }, { /* [697] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(945), + /* matcher_indices */ MatcherIndicesIndex(917), }, { /* [698] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(817), + /* matcher_indices */ MatcherIndicesIndex(917), }, { /* [699] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(817), + /* matcher_indices */ MatcherIndicesIndex(956), }, { /* [700] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(43), + /* matcher_indices */ MatcherIndicesIndex(932), }, { /* [701] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(817), + /* matcher_indices */ MatcherIndicesIndex(917), }, { /* [702] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(817), + /* matcher_indices */ MatcherIndicesIndex(917), }, { /* [703] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(817), + /* matcher_indices */ MatcherIndicesIndex(947), }, { /* [704] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(877), + /* matcher_indices */ MatcherIndicesIndex(950), }, { /* [705] */ - /* usage */ core::ParameterUsage::kBase, - /* matcher_indices */ MatcherIndicesIndex(43), + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(953), }, { /* [706] */ - /* usage */ core::ParameterUsage::kOffset, - /* matcher_indices */ MatcherIndicesIndex(972), - }, - { - /* [707] */ - /* usage */ core::ParameterUsage::kCount, - /* matcher_indices */ MatcherIndicesIndex(972), - }, - { - /* [708] */ - /* usage */ core::ParameterUsage::kBase, + /* usage */ core::ParameterUsage::kNone, /* matcher_indices */ MatcherIndicesIndex(817), }, { + /* [707] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(817), + }, + { + /* [708] */ + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(43), + }, + { /* [709] */ - /* usage */ core::ParameterUsage::kOffset, - /* matcher_indices */ MatcherIndicesIndex(972), + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(817), }, { /* [710] */ - /* usage */ core::ParameterUsage::kCount, - /* matcher_indices */ MatcherIndicesIndex(972), + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(817), }, { /* [711] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(857), + /* matcher_indices */ MatcherIndicesIndex(817), }, { /* [712] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(43), + /* matcher_indices */ MatcherIndicesIndex(877), }, { /* [713] */ - /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(406), + /* usage */ core::ParameterUsage::kBase, + /* matcher_indices */ MatcherIndicesIndex(43), }, { /* [714] */ - /* usage */ core::ParameterUsage::kLevel, - /* matcher_indices */ MatcherIndicesIndex(52), + /* usage */ core::ParameterUsage::kOffset, + /* matcher_indices */ MatcherIndicesIndex(980), }, { /* [715] */ - /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(415), + /* usage */ core::ParameterUsage::kCount, + /* matcher_indices */ MatcherIndicesIndex(980), }, { /* [716] */ - /* usage */ core::ParameterUsage::kLevel, - /* matcher_indices */ MatcherIndicesIndex(52), + /* usage */ core::ParameterUsage::kBase, + /* matcher_indices */ MatcherIndicesIndex(817), }, { /* [717] */ - /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(424), + /* usage */ core::ParameterUsage::kOffset, + /* matcher_indices */ MatcherIndicesIndex(980), }, { /* [718] */ - /* usage */ core::ParameterUsage::kLevel, - /* matcher_indices */ MatcherIndicesIndex(52), + /* usage */ core::ParameterUsage::kCount, + /* matcher_indices */ MatcherIndicesIndex(980), }, { /* [719] */ - /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(433), + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(857), }, { /* [720] */ - /* usage */ core::ParameterUsage::kLevel, - /* matcher_indices */ MatcherIndicesIndex(52), + /* usage */ core::ParameterUsage::kNone, + /* matcher_indices */ MatcherIndicesIndex(43), }, { /* [721] */ /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(442), + /* matcher_indices */ MatcherIndicesIndex(406), }, { /* [722] */ @@ -5900,7 +5908,7 @@ { /* [723] */ /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(451), + /* matcher_indices */ MatcherIndicesIndex(415), }, { /* [724] */ @@ -5910,227 +5918,267 @@ { /* [725] */ /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(460), + /* matcher_indices */ MatcherIndicesIndex(424), }, { /* [726] */ /* usage */ core::ParameterUsage::kLevel, - /* matcher_indices */ MatcherIndicesIndex(8), + /* matcher_indices */ MatcherIndicesIndex(52), }, { /* [727] */ /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(469), + /* matcher_indices */ MatcherIndicesIndex(433), }, { /* [728] */ /* usage */ core::ParameterUsage::kLevel, - /* matcher_indices */ MatcherIndicesIndex(8), + /* matcher_indices */ MatcherIndicesIndex(52), }, { /* [729] */ /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(478), + /* matcher_indices */ MatcherIndicesIndex(442), }, { /* [730] */ /* usage */ core::ParameterUsage::kLevel, - /* matcher_indices */ MatcherIndicesIndex(8), + /* matcher_indices */ MatcherIndicesIndex(52), }, { /* [731] */ /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(487), + /* matcher_indices */ MatcherIndicesIndex(451), }, { /* [732] */ /* usage */ core::ParameterUsage::kLevel, - /* matcher_indices */ MatcherIndicesIndex(8), + /* matcher_indices */ MatcherIndicesIndex(52), }, { /* [733] */ /* usage */ core::ParameterUsage::kImage, - /* matcher_indices */ MatcherIndicesIndex(622), + /* matcher_indices */ MatcherIndicesIndex(460), }, { /* [734] */ + /* usage */ core::ParameterUsage::kLevel, + /* matcher_indices */ MatcherIndicesIndex(8), + }, + { + /* [735] */ + /* usage */ core::ParameterUsage::kImage, + /* matcher_indices */ MatcherIndicesIndex(469), + }, + { + /* [736] */ + /* usage */ core::ParameterUsage::kLevel, + /* matcher_indices */ MatcherIndicesIndex(8), + }, + { + /* [737] */ + /* usage */ core::ParameterUsage::kImage, + /* matcher_indices */ MatcherIndicesIndex(478), + }, + { + /* [738] */ + /* usage */ core::ParameterUsage::kLevel, + /* matcher_indices */ MatcherIndicesIndex(8), + }, + { + /* [739] */ + /* usage */ core::ParameterUsage::kImage, + /* matcher_indices */ MatcherIndicesIndex(487), + }, + { + /* [740] */ + /* usage */ core::ParameterUsage::kLevel, + /* matcher_indices */ MatcherIndicesIndex(8), + }, + { + /* [741] */ + /* usage */ core::ParameterUsage::kImage, + /* matcher_indices */ MatcherIndicesIndex(622), + }, + { + /* [742] */ /* usage */ core::ParameterUsage::kCoords, /* matcher_indices */ MatcherIndicesIndex(53), }, { - /* [735] */ + /* [743] */ /* usage */ core::ParameterUsage::kNone, /* matcher_indices */ MatcherIndicesIndex(873), }, { - /* [736] */ + /* [744] */ /* usage */ core::ParameterUsage::kNone, /* matcher_indices */ MatcherIndicesIndex(877), }, { - /* [737] */ + /* [745] */ /* usage */ core::ParameterUsage::kNone, /* matcher_indices */ MatcherIndicesIndex(881), }, { - /* [738] */ + /* [746] */ /* usage */ core::ParameterUsage::kNone, /* matcher_indices */ MatcherIndicesIndex(43), }, { - /* [739] */ + /* [747] */ /* usage */ core::ParameterUsage::kNone, /* matcher_indices */ MatcherIndicesIndex(881), }, { - /* [740] */ + /* [748] */ /* usage */ core::ParameterUsage::kNone, /* matcher_indices */ MatcherIndicesIndex(817), }, { - /* [741] */ + /* [749] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(921), + /* matcher_indices */ MatcherIndicesIndex(929), }, { - /* [742] */ + /* [750] */ /* usage */ core::ParameterUsage::kNone, /* matcher_indices */ MatcherIndicesIndex(823), }, { - /* [743] */ + /* [751] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(930), + /* matcher_indices */ MatcherIndicesIndex(938), }, { - /* [744] */ + /* [752] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(933), + /* matcher_indices */ MatcherIndicesIndex(941), }, { - /* [745] */ + /* [753] */ /* usage */ core::ParameterUsage::kX, /* matcher_indices */ MatcherIndicesIndex(43), }, { - /* [746] */ + /* [754] */ /* usage */ core::ParameterUsage::kI, /* matcher_indices */ MatcherIndicesIndex(885), }, { - /* [747] */ + /* [755] */ /* usage */ core::ParameterUsage::kX, /* matcher_indices */ MatcherIndicesIndex(817), }, { - /* [748] */ + /* [756] */ /* usage */ core::ParameterUsage::kI, /* matcher_indices */ MatcherIndicesIndex(815), }, { - /* [749] */ + /* [757] */ /* usage */ core::ParameterUsage::kX, /* matcher_indices */ MatcherIndicesIndex(43), }, { - /* [750] */ + /* [758] */ /* usage */ core::ParameterUsage::kI, /* matcher_indices */ MatcherIndicesIndex(889), }, { - /* [751] */ + /* [759] */ /* usage */ core::ParameterUsage::kX, - /* matcher_indices */ MatcherIndicesIndex(921), + /* matcher_indices */ MatcherIndicesIndex(929), }, { - /* [752] */ + /* [760] */ /* usage */ core::ParameterUsage::kI, /* matcher_indices */ MatcherIndicesIndex(821), }, { - /* [753] */ + /* [761] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(298), }, { - /* [754] */ + /* [762] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(307), }, { - /* [755] */ + /* [763] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(316), }, { - /* [756] */ + /* [764] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(325), }, { - /* [757] */ + /* [765] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(334), }, { - /* [758] */ + /* [766] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(343), }, { - /* [759] */ + /* [767] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(352), }, { - /* [760] */ + /* [768] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(361), }, { - /* [761] */ + /* [769] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(370), }, { - /* [762] */ + /* [770] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(379), }, { - /* [763] */ + /* [771] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(388), }, { - /* [764] */ + /* [772] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(397), }, { - /* [765] */ + /* [773] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(496), }, { - /* [766] */ + /* [774] */ /* usage */ core::ParameterUsage::kImage, /* matcher_indices */ MatcherIndicesIndex(505), }, { - /* [767] */ + /* [775] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(966), + /* matcher_indices */ MatcherIndicesIndex(974), }, { - /* [768] */ + /* [776] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(968), + /* matcher_indices */ MatcherIndicesIndex(976), }, { - /* [769] */ + /* [777] */ /* usage */ core::ParameterUsage::kNone, - /* matcher_indices */ MatcherIndicesIndex(970), + /* matcher_indices */ MatcherIndicesIndex(978), }, }; @@ -6159,13 +6207,13 @@ { /* [3] */ /* name */ "Z", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [4] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), + /* matcher_indices */ MatcherIndicesIndex(982), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6201,19 +6249,19 @@ { /* [10] */ /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [11] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), + /* matcher_indices */ MatcherIndicesIndex(982), /* kind */ TemplateInfo::Kind::kType, }, { /* [12] */ /* name */ "L", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6237,13 +6285,13 @@ { /* [16] */ /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [17] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), + /* matcher_indices */ MatcherIndicesIndex(982), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6267,13 +6315,13 @@ { /* [21] */ /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [22] */ /* name */ "L", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6297,25 +6345,25 @@ { /* [26] */ /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [27] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [28] */ /* name */ "U", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [29] */ /* name */ "V", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6327,13 +6375,13 @@ { /* [31] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(973), + /* matcher_indices */ MatcherIndicesIndex(981), /* kind */ TemplateInfo::Kind::kType, }, { /* [32] */ /* name */ "U", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6351,7 +6399,7 @@ { /* [35] */ /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(978), + /* matcher_indices */ MatcherIndicesIndex(986), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6369,493 +6417,493 @@ { /* [38] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(979), + /* matcher_indices */ MatcherIndicesIndex(832), /* kind */ TemplateInfo::Kind::kType, }, { /* [39] */ - /* name */ "TR", - /* matcher_indices */ MatcherIndicesIndex(979), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [40] */ - /* name */ "C", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [41] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [42] */ /* name */ "K", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { - /* [43] */ + /* [40] */ /* name */ "S", /* matcher_indices */ MatcherIndicesIndex(658), /* kind */ TemplateInfo::Kind::kType, }, { - /* [44] */ + /* [41] */ /* name */ "C", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { + /* [42] */ + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [43] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(832), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [44] */ + /* name */ "K", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { /* [45] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [46] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [47] */ - /* name */ "C", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [48] */ - /* name */ "Z", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [49] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [50] */ - /* name */ "N", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [51] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(976), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [52] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [53] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [54] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [55] */ - /* name */ "A", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [56] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [57] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [58] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [59] */ - /* name */ "A", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [60] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [61] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [62] */ - /* name */ "C", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [63] */ - /* name */ "A", - /* matcher_indices */ MatcherIndicesIndex(9), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [64] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [65] */ - /* name */ "Z", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [66] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [67] */ - /* name */ "N", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [68] */ - /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(743), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [69] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [70] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [71] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [72] */ - /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(752), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [73] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [74] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [75] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [76] */ - /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(761), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [77] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [78] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [79] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [80] */ - /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(770), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [81] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [82] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [83] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [84] */ - /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(779), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [85] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [86] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [87] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [88] */ - /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(788), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [89] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [90] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [91] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [92] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(973), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [93] */ - /* name */ "K", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [94] */ - /* name */ "C", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [95] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [96] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [97] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [98] */ - /* name */ "U", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [99] */ - /* name */ "N", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [100] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(973), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [101] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [102] */ - /* name */ "N", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [103] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(977), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [104] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [105] */ - /* name */ "A", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [106] */ - /* name */ "B", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [107] */ - /* name */ "N", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [108] */ - /* name */ "K", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [109] */ /* name */ "S", /* matcher_indices */ MatcherIndicesIndex(831), /* kind */ TemplateInfo::Kind::kType, }, { - /* [110] */ + /* [46] */ /* name */ "C", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { - /* [111] */ + /* [47] */ /* name */ "R", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { - /* [112] */ + /* [48] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(987), /* kind */ TemplateInfo::Kind::kType, }, { - /* [113] */ - /* name */ "U", - /* matcher_indices */ MatcherIndicesIndex(533), + /* [49] */ + /* name */ "TR", + /* matcher_indices */ MatcherIndicesIndex(987), /* kind */ TemplateInfo::Kind::kType, }, { - /* [114] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(2), + /* [50] */ + /* name */ "C", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { - /* [115] */ + /* [51] */ + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [52] */ + /* name */ "K", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [53] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), + /* matcher_indices */ MatcherIndicesIndex(982), /* kind */ TemplateInfo::Kind::kType, }, { - /* [116] */ + /* [54] */ /* name */ "C", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { - /* [117] */ + /* [55] */ + /* name */ "Z", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [56] */ /* name */ "F", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { - /* [118] */ + /* [57] */ + /* name */ "N", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [58] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(984), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [59] */ + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [60] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [61] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [62] */ /* name */ "A", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { - /* [119] */ + /* [63] */ /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [64] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [65] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [66] */ + /* name */ "A", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [67] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [68] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [69] */ + /* name */ "C", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [70] */ + /* name */ "A", + /* matcher_indices */ MatcherIndicesIndex(9), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [71] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [72] */ + /* name */ "Z", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [73] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [74] */ + /* name */ "N", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [75] */ + /* name */ "I", + /* matcher_indices */ MatcherIndicesIndex(743), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [76] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [77] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(983), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [78] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [79] */ + /* name */ "I", + /* matcher_indices */ MatcherIndicesIndex(752), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [80] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [81] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(983), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [82] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [83] */ + /* name */ "I", + /* matcher_indices */ MatcherIndicesIndex(761), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [84] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [85] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(983), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [86] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [87] */ + /* name */ "I", + /* matcher_indices */ MatcherIndicesIndex(770), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [88] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [89] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(983), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [90] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [91] */ + /* name */ "I", + /* matcher_indices */ MatcherIndicesIndex(779), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [92] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [93] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(983), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [94] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [95] */ + /* name */ "I", + /* matcher_indices */ MatcherIndicesIndex(788), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [96] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [97] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(983), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [98] */ + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [99] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(981), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [100] */ + /* name */ "K", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [101] */ + /* name */ "C", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [102] */ + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [103] */ + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [104] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [105] */ + /* name */ "U", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [106] */ + /* name */ "N", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [107] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(981), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [108] */ + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [109] */ + /* name */ "N", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [110] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(985), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [111] */ + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [112] */ + /* name */ "A", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [113] */ + /* name */ "B", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [114] */ + /* name */ "N", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [115] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [116] */ + /* name */ "U", + /* matcher_indices */ MatcherIndicesIndex(533), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [117] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(2), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [118] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [119] */ + /* name */ "C", + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6872,26 +6920,26 @@ }, { /* [122] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(524), - /* kind */ TemplateInfo::Kind::kNumber, + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, }, { /* [123] */ - /* name */ "A", - /* matcher_indices */ MatcherIndicesIndex(9), + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { /* [124] */ - /* name */ "C", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, + /* name */ "A", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, }, { /* [125] */ /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(533), + /* matcher_indices */ MatcherIndicesIndex(524), /* kind */ TemplateInfo::Kind::kNumber, }, { @@ -6903,13 +6951,13 @@ { /* [127] */ /* name */ "C", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [128] */ /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(658), + /* matcher_indices */ MatcherIndicesIndex(533), /* kind */ TemplateInfo::Kind::kNumber, }, { @@ -6921,55 +6969,55 @@ { /* [130] */ /* name */ "C", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [131] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(974), - /* kind */ TemplateInfo::Kind::kType, + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(658), + /* kind */ TemplateInfo::Kind::kNumber, }, { /* [132] */ - /* name */ "F", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* name */ "A", + /* matcher_indices */ MatcherIndicesIndex(9), /* kind */ TemplateInfo::Kind::kNumber, }, { /* [133] */ - /* name */ "N", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, + /* name */ "C", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, }, { /* [134] */ - /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(106), + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(982), /* kind */ TemplateInfo::Kind::kType, }, { /* [135] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), - /* kind */ TemplateInfo::Kind::kType, + /* name */ "F", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, }, { /* [136] */ - /* name */ "F", + /* name */ "N", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { /* [137] */ /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(116), + /* matcher_indices */ MatcherIndicesIndex(106), /* kind */ TemplateInfo::Kind::kType, }, { /* [138] */ /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), + /* matcher_indices */ MatcherIndicesIndex(983), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6981,13 +7029,13 @@ { /* [140] */ /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(797), + /* matcher_indices */ MatcherIndicesIndex(116), /* kind */ TemplateInfo::Kind::kType, }, { /* [141] */ /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), + /* matcher_indices */ MatcherIndicesIndex(983), /* kind */ TemplateInfo::Kind::kType, }, { @@ -6999,13 +7047,13 @@ { /* [143] */ /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(806), + /* matcher_indices */ MatcherIndicesIndex(797), /* kind */ TemplateInfo::Kind::kType, }, { /* [144] */ /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(975), + /* matcher_indices */ MatcherIndicesIndex(983), /* kind */ TemplateInfo::Kind::kType, }, { @@ -7016,104 +7064,104 @@ }, { /* [146] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(973), + /* name */ "I", + /* matcher_indices */ MatcherIndicesIndex(806), /* kind */ TemplateInfo::Kind::kType, }, { /* [147] */ - /* name */ "N", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(983), + /* kind */ TemplateInfo::Kind::kType, }, { /* [148] */ - /* name */ "M", + /* name */ "F", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { /* [149] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(981), /* kind */ TemplateInfo::Kind::kType, }, { /* [150] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, + /* name */ "N", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, }, { /* [151] */ - /* name */ "N", + /* name */ "M", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { /* [152] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(973), + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [153] */ - /* name */ "N", - /* matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* kind */ TemplateInfo::Kind::kNumber, + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, }, { /* [154] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(977), + /* name */ "N", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { /* [155] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(973), + /* matcher_indices */ MatcherIndicesIndex(981), /* kind */ TemplateInfo::Kind::kType, }, { /* [156] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [157] */ - /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(977), - /* kind */ TemplateInfo::Kind::kNumber, - }, - { - /* [158] */ - /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [159] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(973), - /* kind */ TemplateInfo::Kind::kType, - }, - { - /* [160] */ /* name */ "N", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { + /* [157] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(985), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [158] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(981), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [159] */ + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [160] */ + /* name */ "S", + /* matcher_indices */ MatcherIndicesIndex(985), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { /* [161] */ /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(973), + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [162] */ /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(981), /* kind */ TemplateInfo::Kind::kType, }, { @@ -7125,13 +7173,13 @@ { /* [164] */ /* name */ "R", - /* matcher_indices */ MatcherIndicesIndex(972), + /* matcher_indices */ MatcherIndicesIndex(981), /* kind */ TemplateInfo::Kind::kType, }, { /* [165] */ - /* name */ "A", - /* matcher_indices */ MatcherIndicesIndex(972), + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { @@ -7142,26 +7190,44 @@ }, { /* [167] */ - /* name */ "I", - /* matcher_indices */ MatcherIndicesIndex(533), + /* name */ "R", + /* matcher_indices */ MatcherIndicesIndex(980), /* kind */ TemplateInfo::Kind::kType, }, { /* [168] */ /* name */ "A", + /* matcher_indices */ MatcherIndicesIndex(980), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [169] */ + /* name */ "N", /* matcher_indices */ MatcherIndicesIndex(/* invalid */), /* kind */ TemplateInfo::Kind::kNumber, }, { - /* [169] */ - /* name */ "T", - /* matcher_indices */ MatcherIndicesIndex(973), + /* [170] */ + /* name */ "I", + /* matcher_indices */ MatcherIndicesIndex(533), /* kind */ TemplateInfo::Kind::kType, }, { - /* [170] */ + /* [171] */ + /* name */ "A", + /* matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* kind */ TemplateInfo::Kind::kNumber, + }, + { + /* [172] */ + /* name */ "T", + /* matcher_indices */ MatcherIndicesIndex(981), + /* kind */ TemplateInfo::Kind::kType, + }, + { + /* [173] */ /* name */ "S", - /* matcher_indices */ MatcherIndicesIndex(977), + /* matcher_indices */ MatcherIndicesIndex(985), /* kind */ TemplateInfo::Kind::kNumber, }, }; @@ -7176,9 +7242,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), - /* parameters */ ParameterIndex(679), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(60), + /* parameters */ ParameterIndex(687), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7187,9 +7253,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(131), - /* parameters */ ParameterIndex(682), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(134), + /* parameters */ ParameterIndex(690), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7198,9 +7264,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(131), + /* templates */ TemplateIndex(134), /* parameters */ ParameterIndex(142), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7209,9 +7275,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(131), + /* templates */ TemplateIndex(134), /* parameters */ ParameterIndex(392), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7220,9 +7286,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(107), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7231,9 +7297,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(396), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7242,9 +7308,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(152), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7253,9 +7319,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(157), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7264,9 +7330,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(400), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7275,9 +7341,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(404), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7286,9 +7352,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(408), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7297,9 +7363,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(412), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7308,9 +7374,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(112), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7319,9 +7385,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(117), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7330,9 +7396,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(172), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7341,9 +7407,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(177), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7352,9 +7418,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(416), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7363,9 +7429,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(420), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7374,9 +7440,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(122), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7385,9 +7451,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(127), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7396,9 +7462,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(424), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7407,9 +7473,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(428), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7418,9 +7484,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(192), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7429,9 +7495,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(197), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7440,9 +7506,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(432), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7451,9 +7517,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(436), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7462,9 +7528,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(202), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7473,9 +7539,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(440), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7484,9 +7550,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(49), + /* templates */ TemplateIndex(56), /* parameters */ ParameterIndex(512), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7495,9 +7561,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(444), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7508,7 +7574,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(524), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7519,7 +7585,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(528), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7530,7 +7596,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(516), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7541,7 +7607,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(520), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7550,9 +7616,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(448), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7561,9 +7627,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(452), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7574,7 +7640,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(532), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7583,9 +7649,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(131), + /* templates */ TemplateIndex(134), /* parameters */ ParameterIndex(480), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7594,9 +7660,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(131), + /* templates */ TemplateIndex(134), /* parameters */ ParameterIndex(142), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7605,9 +7671,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(147), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7616,9 +7682,9 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(17), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7627,9 +7693,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(484), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7638,9 +7704,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(488), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7649,9 +7715,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(152), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7660,9 +7726,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(157), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7671,9 +7737,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(162), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7682,9 +7748,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(167), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7693,9 +7759,9 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(23), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7704,9 +7770,9 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(29), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7715,9 +7781,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(492), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7726,9 +7792,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(496), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7737,9 +7803,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(172), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7748,9 +7814,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(177), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7759,9 +7825,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(182), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7770,9 +7836,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(187), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7781,9 +7847,9 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(35), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7792,9 +7858,9 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(41), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7803,9 +7869,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(500), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7814,9 +7880,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(504), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7825,9 +7891,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(192), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7836,9 +7902,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(197), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7847,9 +7913,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(508), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7858,9 +7924,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(202), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7869,9 +7935,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(49), + /* templates */ TemplateIndex(56), /* parameters */ ParameterIndex(512), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7880,9 +7946,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(207), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7893,7 +7959,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(516), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7904,7 +7970,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(520), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7913,9 +7979,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(212), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7924,9 +7990,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(217), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7937,7 +8003,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(524), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7948,7 +8014,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(528), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7959,7 +8025,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(532), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7968,9 +8034,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(131), - /* parameters */ ParameterIndex(682), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(134), + /* parameters */ ParameterIndex(690), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7979,9 +8045,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(222), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -7990,9 +8056,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(227), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8001,9 +8067,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(456), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8012,9 +8078,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(460), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8023,9 +8089,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(132), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8034,9 +8100,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(137), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8045,9 +8111,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(464), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8056,9 +8122,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(468), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8067,9 +8133,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(177), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8078,9 +8144,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(420), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8089,9 +8155,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(127), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8100,9 +8166,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(428), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8113,7 +8179,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(544), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8124,7 +8190,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(548), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8133,9 +8199,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(472), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8144,9 +8210,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(476), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8155,9 +8221,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(536), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8166,9 +8232,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(540), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8177,9 +8243,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(222), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8188,9 +8254,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(227), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8199,9 +8265,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(232), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8210,9 +8276,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(237), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8221,9 +8287,9 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(47), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8232,9 +8298,9 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(53), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8243,9 +8309,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(496), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8254,9 +8320,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(177), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8265,9 +8331,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(187), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8276,9 +8342,9 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(64), + /* templates */ TemplateIndex(71), /* parameters */ ParameterIndex(41), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8287,9 +8353,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(53), + /* templates */ TemplateIndex(60), /* parameters */ ParameterIndex(504), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8300,7 +8366,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(544), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8311,7 +8377,7 @@ /* num_templates */ 1, /* templates */ TemplateIndex(1), /* parameters */ ParameterIndex(548), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8320,9 +8386,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(242), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8331,9 +8397,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(247), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8342,9 +8408,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), - /* parameters */ ParameterIndex(619), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* templates */ TemplateIndex(118), + /* parameters */ ParameterIndex(627), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8353,9 +8419,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), - /* parameters */ ParameterIndex(622), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* templates */ TemplateIndex(118), + /* parameters */ ParameterIndex(630), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8364,9 +8430,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), - /* parameters */ ParameterIndex(625), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* templates */ TemplateIndex(118), + /* parameters */ ParameterIndex(633), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8375,9 +8441,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), - /* parameters */ ParameterIndex(628), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* templates */ TemplateIndex(118), + /* parameters */ ParameterIndex(636), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8386,9 +8452,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), - /* parameters */ ParameterIndex(631), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* templates */ TemplateIndex(118), + /* parameters */ ParameterIndex(639), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8397,9 +8463,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(116), - /* parameters */ ParameterIndex(634), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(119), + /* parameters */ ParameterIndex(642), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8408,9 +8474,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(116), - /* parameters */ ParameterIndex(637), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(119), + /* parameters */ ParameterIndex(645), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8419,9 +8485,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(116), - /* parameters */ ParameterIndex(640), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(119), + /* parameters */ ParameterIndex(648), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8430,9 +8496,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(46), + /* templates */ TemplateIndex(53), /* parameters */ ParameterIndex(328), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8441,9 +8507,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(46), + /* templates */ TemplateIndex(53), /* parameters */ ParameterIndex(332), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8452,9 +8518,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(46), + /* templates */ TemplateIndex(53), /* parameters */ ParameterIndex(336), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8463,9 +8529,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(46), + /* templates */ TemplateIndex(53), /* parameters */ ParameterIndex(340), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8474,9 +8540,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(46), + /* templates */ TemplateIndex(53), /* parameters */ ParameterIndex(344), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8485,9 +8551,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(47), + /* templates */ TemplateIndex(54), /* parameters */ ParameterIndex(348), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8496,9 +8562,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(47), + /* templates */ TemplateIndex(54), /* parameters */ ParameterIndex(352), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8507,9 +8573,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(47), + /* templates */ TemplateIndex(54), /* parameters */ ParameterIndex(356), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8518,9 +8584,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(122), - /* parameters */ ParameterIndex(643), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(125), + /* parameters */ ParameterIndex(651), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8529,9 +8595,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(125), - /* parameters */ ParameterIndex(646), - /* return_matcher_indices */ MatcherIndicesIndex(958), + /* templates */ TemplateIndex(128), + /* parameters */ ParameterIndex(654), + /* return_matcher_indices */ MatcherIndicesIndex(966), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8540,9 +8606,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(128), - /* parameters */ ParameterIndex(649), - /* return_matcher_indices */ MatcherIndicesIndex(960), + /* templates */ TemplateIndex(131), + /* parameters */ ParameterIndex(657), + /* return_matcher_indices */ MatcherIndicesIndex(968), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8551,9 +8617,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(122), - /* parameters */ ParameterIndex(652), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(125), + /* parameters */ ParameterIndex(660), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8562,9 +8628,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(125), - /* parameters */ ParameterIndex(655), - /* return_matcher_indices */ MatcherIndicesIndex(958), + /* templates */ TemplateIndex(128), + /* parameters */ ParameterIndex(663), + /* return_matcher_indices */ MatcherIndicesIndex(966), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8573,9 +8639,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(128), - /* parameters */ ParameterIndex(658), - /* return_matcher_indices */ MatcherIndicesIndex(960), + /* templates */ TemplateIndex(131), + /* parameters */ ParameterIndex(666), + /* return_matcher_indices */ MatcherIndicesIndex(968), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8584,9 +8650,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(122), - /* parameters */ ParameterIndex(661), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(125), + /* parameters */ ParameterIndex(669), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8595,9 +8661,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(125), - /* parameters */ ParameterIndex(664), - /* return_matcher_indices */ MatcherIndicesIndex(958), + /* templates */ TemplateIndex(128), + /* parameters */ ParameterIndex(672), + /* return_matcher_indices */ MatcherIndicesIndex(966), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8606,9 +8672,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(128), - /* parameters */ ParameterIndex(667), - /* return_matcher_indices */ MatcherIndicesIndex(960), + /* templates */ TemplateIndex(131), + /* parameters */ ParameterIndex(675), + /* return_matcher_indices */ MatcherIndicesIndex(968), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8617,9 +8683,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(122), - /* parameters */ ParameterIndex(670), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* templates */ TemplateIndex(125), + /* parameters */ ParameterIndex(678), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8628,9 +8694,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(125), - /* parameters */ ParameterIndex(673), - /* return_matcher_indices */ MatcherIndicesIndex(958), + /* templates */ TemplateIndex(128), + /* parameters */ ParameterIndex(681), + /* return_matcher_indices */ MatcherIndicesIndex(966), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8639,9 +8705,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(128), - /* parameters */ ParameterIndex(676), - /* return_matcher_indices */ MatcherIndicesIndex(960), + /* templates */ TemplateIndex(131), + /* parameters */ ParameterIndex(684), + /* return_matcher_indices */ MatcherIndicesIndex(968), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8650,9 +8716,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(60), - /* parameters */ ParameterIndex(733), - /* return_matcher_indices */ MatcherIndicesIndex(962), + /* templates */ TemplateIndex(67), + /* parameters */ ParameterIndex(741), + /* return_matcher_indices */ MatcherIndicesIndex(970), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8661,9 +8727,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), + /* templates */ TemplateIndex(118), /* parameters */ ParameterIndex(360), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8672,9 +8738,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(46), + /* templates */ TemplateIndex(53), /* parameters */ ParameterIndex(87), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8683,9 +8749,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), + /* templates */ TemplateIndex(118), /* parameters */ ParameterIndex(364), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8694,9 +8760,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 4, - /* templates */ TemplateIndex(46), + /* templates */ TemplateIndex(53), /* parameters */ ParameterIndex(92), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8705,9 +8771,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), + /* templates */ TemplateIndex(118), /* parameters */ ParameterIndex(368), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8716,9 +8782,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(115), + /* templates */ TemplateIndex(118), /* parameters */ ParameterIndex(372), - /* return_matcher_indices */ MatcherIndicesIndex(956), + /* return_matcher_indices */ MatcherIndicesIndex(964), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8727,9 +8793,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(376), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8738,9 +8804,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(47), + /* templates */ TemplateIndex(54), /* parameters */ ParameterIndex(97), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8749,9 +8815,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(380), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8760,9 +8826,9 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(47), + /* templates */ TemplateIndex(54), /* parameters */ ParameterIndex(102), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8771,9 +8837,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(384), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8782,9 +8848,9 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(388), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -8793,8 +8859,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(52), - /* parameters */ ParameterIndex(753), + /* templates */ TemplateIndex(59), + /* parameters */ ParameterIndex(761), /* return_matcher_indices */ MatcherIndicesIndex(43), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8804,8 +8870,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(52), - /* parameters */ ParameterIndex(754), + /* templates */ TemplateIndex(59), + /* parameters */ ParameterIndex(762), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8815,8 +8881,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(52), - /* parameters */ ParameterIndex(755), + /* templates */ TemplateIndex(59), + /* parameters */ ParameterIndex(763), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8826,8 +8892,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(52), - /* parameters */ ParameterIndex(756), + /* templates */ TemplateIndex(59), + /* parameters */ ParameterIndex(764), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8837,8 +8903,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(52), - /* parameters */ ParameterIndex(757), + /* templates */ TemplateIndex(59), + /* parameters */ ParameterIndex(765), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8848,8 +8914,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(52), - /* parameters */ ParameterIndex(758), + /* templates */ TemplateIndex(59), + /* parameters */ ParameterIndex(766), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8860,7 +8926,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 5, /* templates */ TemplateIndex(16), - /* parameters */ ParameterIndex(759), + /* parameters */ ParameterIndex(767), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8870,8 +8936,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 3, - /* templates */ TemplateIndex(119), - /* parameters */ ParameterIndex(760), + /* templates */ TemplateIndex(122), + /* parameters */ ParameterIndex(768), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8881,8 +8947,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 3, - /* templates */ TemplateIndex(119), - /* parameters */ ParameterIndex(761), + /* templates */ TemplateIndex(122), + /* parameters */ ParameterIndex(769), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8892,8 +8958,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 3, - /* templates */ TemplateIndex(119), - /* parameters */ ParameterIndex(762), + /* templates */ TemplateIndex(122), + /* parameters */ ParameterIndex(770), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8903,8 +8969,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 3, - /* templates */ TemplateIndex(119), - /* parameters */ ParameterIndex(763), + /* templates */ TemplateIndex(122), + /* parameters */ ParameterIndex(771), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8914,8 +8980,8 @@ /* num_parameters */ 1, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(56), - /* parameters */ ParameterIndex(764), + /* templates */ TemplateIndex(63), + /* parameters */ ParameterIndex(772), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -8925,7 +8991,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(552), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -8936,7 +9002,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(556), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -8947,7 +9013,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(560), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -8958,7 +9024,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(564), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -8969,7 +9035,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(568), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -8980,7 +9046,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(572), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -8991,7 +9057,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(576), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9002,7 +9068,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(580), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9013,7 +9079,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(584), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9024,7 +9090,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(588), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9035,7 +9101,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(592), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9046,7 +9112,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(116), + /* templates */ TemplateIndex(119), /* parameters */ ParameterIndex(596), /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9058,7 +9124,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 6, /* templates */ TemplateIndex(10), - /* parameters */ ParameterIndex(713), + /* parameters */ ParameterIndex(721), /* return_matcher_indices */ MatcherIndicesIndex(43), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9069,7 +9135,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 6, /* templates */ TemplateIndex(10), - /* parameters */ ParameterIndex(715), + /* parameters */ ParameterIndex(723), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9080,7 +9146,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 6, /* templates */ TemplateIndex(10), - /* parameters */ ParameterIndex(717), + /* parameters */ ParameterIndex(725), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9091,7 +9157,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 6, /* templates */ TemplateIndex(10), - /* parameters */ ParameterIndex(719), + /* parameters */ ParameterIndex(727), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9102,7 +9168,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 6, /* templates */ TemplateIndex(10), - /* parameters */ ParameterIndex(721), + /* parameters */ ParameterIndex(729), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9113,7 +9179,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 6, /* templates */ TemplateIndex(10), - /* parameters */ ParameterIndex(723), + /* parameters */ ParameterIndex(731), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9124,7 +9190,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 5, /* templates */ TemplateIndex(21), - /* parameters */ ParameterIndex(725), + /* parameters */ ParameterIndex(733), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9135,7 +9201,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 5, /* templates */ TemplateIndex(21), - /* parameters */ ParameterIndex(727), + /* parameters */ ParameterIndex(735), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9146,7 +9212,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 5, /* templates */ TemplateIndex(21), - /* parameters */ ParameterIndex(729), + /* parameters */ ParameterIndex(737), /* return_matcher_indices */ MatcherIndicesIndex(42), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9157,7 +9223,7 @@ /* num_explicit_templates */ 1, /* num_templates */ 5, /* templates */ TemplateIndex(21), - /* parameters */ ParameterIndex(731), + /* parameters */ ParameterIndex(739), /* return_matcher_indices */ MatcherIndicesIndex(659), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9167,9 +9233,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(68), + /* templates */ TemplateIndex(75), /* parameters */ ParameterIndex(6), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9178,9 +9244,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(72), + /* templates */ TemplateIndex(79), /* parameters */ ParameterIndex(6), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9189,9 +9255,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(76), + /* templates */ TemplateIndex(83), /* parameters */ ParameterIndex(6), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9200,9 +9266,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(80), + /* templates */ TemplateIndex(87), /* parameters */ ParameterIndex(6), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9211,9 +9277,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(84), + /* templates */ TemplateIndex(91), /* parameters */ ParameterIndex(6), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9222,9 +9288,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 4, - /* templates */ TemplateIndex(88), + /* templates */ TemplateIndex(95), /* parameters */ ParameterIndex(6), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9233,9 +9299,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 3, - /* templates */ TemplateIndex(134), + /* templates */ TemplateIndex(137), /* parameters */ ParameterIndex(13), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9244,9 +9310,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 3, - /* templates */ TemplateIndex(137), + /* templates */ TemplateIndex(140), /* parameters */ ParameterIndex(13), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9255,9 +9321,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 3, - /* templates */ TemplateIndex(140), + /* templates */ TemplateIndex(143), /* parameters */ ParameterIndex(13), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9266,9 +9332,9 @@ /* num_parameters */ 2, /* num_explicit_templates */ 1, /* num_templates */ 3, - /* templates */ TemplateIndex(143), + /* templates */ TemplateIndex(146), /* parameters */ ParameterIndex(13), - /* return_matcher_indices */ MatcherIndicesIndex(964), + /* return_matcher_indices */ MatcherIndicesIndex(972), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9277,7 +9343,7 @@ /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(49), + /* templates */ TemplateIndex(56), /* parameters */ ParameterIndex(267), /* return_matcher_indices */ MatcherIndicesIndex(2), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9288,7 +9354,7 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(252), /* return_matcher_indices */ MatcherIndicesIndex(2), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9321,7 +9387,7 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(257), /* return_matcher_indices */ MatcherIndicesIndex(2), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9332,7 +9398,7 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(262), /* return_matcher_indices */ MatcherIndicesIndex(2), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9376,7 +9442,7 @@ /* num_parameters */ 5, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(49), + /* templates */ TemplateIndex(56), /* parameters */ ParameterIndex(267), /* return_matcher_indices */ MatcherIndicesIndex(2), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9387,7 +9453,7 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 3, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(59), /* return_matcher_indices */ MatcherIndicesIndex(2), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9420,7 +9486,7 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(65), /* return_matcher_indices */ MatcherIndicesIndex(2), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9431,7 +9497,7 @@ /* num_parameters */ 6, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(48), + /* templates */ TemplateIndex(55), /* parameters */ ParameterIndex(71), /* return_matcher_indices */ MatcherIndicesIndex(2), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), @@ -9477,7 +9543,7 @@ /* num_templates */ 2, /* templates */ TemplateIndex(0), /* parameters */ ParameterIndex(77), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9488,7 +9554,7 @@ /* num_templates */ 4, /* templates */ TemplateIndex(0), /* parameters */ ParameterIndex(77), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9499,7 +9565,7 @@ /* num_templates */ 2, /* templates */ TemplateIndex(0), /* parameters */ ParameterIndex(82), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9510,7 +9576,7 @@ /* num_templates */ 4, /* templates */ TemplateIndex(0), /* parameters */ ParameterIndex(82), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9521,7 +9587,7 @@ /* num_templates */ 2, /* templates */ TemplateIndex(0), /* parameters */ ParameterIndex(320), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9532,7 +9598,7 @@ /* num_templates */ 2, /* templates */ TemplateIndex(0), /* parameters */ ParameterIndex(324), - /* return_matcher_indices */ MatcherIndicesIndex(954), + /* return_matcher_indices */ MatcherIndicesIndex(962), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9541,8 +9607,8 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 1, - /* templates */ TemplateIndex(51), - /* parameters */ ParameterIndex(685), + /* templates */ TemplateIndex(58), + /* parameters */ ParameterIndex(693), /* return_matcher_indices */ MatcherIndicesIndex(43), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -9552,9 +9618,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(50), - /* parameters */ ParameterIndex(688), - /* return_matcher_indices */ MatcherIndicesIndex(909), + /* templates */ TemplateIndex(57), + /* parameters */ ParameterIndex(696), + /* return_matcher_indices */ MatcherIndicesIndex(917), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9563,9 +9629,9 @@ /* num_parameters */ 3, /* num_explicit_templates */ 0, /* num_templates */ 2, - /* templates */ TemplateIndex(50), - /* parameters */ ParameterIndex(692), - /* return_matcher_indices */ MatcherIndicesIndex(909), + /* templates */ TemplateIndex(57), + /* parameters */ ParameterIndex(700), + /* return_matcher_indices */ MatcherIndicesIndex(917), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9575,8 +9641,8 @@ /* num_explicit_templates */ 0, /* num_templates */ 1, /* templates */ TemplateIndex(31), - /* parameters */ ParameterIndex(767), - /* return_matcher_indices */ MatcherIndicesIndex(966), + /* parameters */ ParameterIndex(775), + /* return_matcher_indices */ MatcherIndicesIndex(974), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9586,8 +9652,8 @@ /* num_explicit_templates */ 0, /* num_templates */ 1, /* templates */ TemplateIndex(31), - /* parameters */ ParameterIndex(768), - /* return_matcher_indices */ MatcherIndicesIndex(968), + /* parameters */ ParameterIndex(776), + /* return_matcher_indices */ MatcherIndicesIndex(976), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { @@ -9597,651 +9663,13 @@ /* num_explicit_templates */ 0, /* num_templates */ 1, /* templates */ TemplateIndex(31), - /* parameters */ ParameterIndex(769), - /* return_matcher_indices */ MatcherIndicesIndex(970), + /* parameters */ ParameterIndex(777), + /* return_matcher_indices */ MatcherIndicesIndex(978), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { /* [221] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 5, - /* num_explicit_templates */ 0, - /* num_templates */ 4, - /* templates */ TemplateIndex(34), - /* parameters */ ParameterIndex(297), - /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [222] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 5, - /* num_explicit_templates */ 0, - /* num_templates */ 4, - /* templates */ TemplateIndex(42), - /* parameters */ ParameterIndex(302), - /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [223] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 5, - /* num_explicit_templates */ 0, - /* num_templates */ 4, - /* templates */ TemplateIndex(108), - /* parameters */ ParameterIndex(307), - /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [224] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(0), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [225] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(616), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [226] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 4, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(312), - /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [227] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 4, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(316), - /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [228] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 4, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(312), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [229] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 4, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(316), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [230] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 6, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(0), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [231] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 6, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(8), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [232] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 0, - /* num_templates */ 1, - /* templates */ TemplateIndex(31), - /* parameters */ ParameterIndex(4), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [233] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(30), - /* parameters */ ParameterIndex(689), - /* return_matcher_indices */ MatcherIndicesIndex(909), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [234] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 2, - /* templates */ TemplateIndex(26), - /* parameters */ ParameterIndex(1), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [235] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 3, - /* templates */ TemplateIndex(149), - /* parameters */ ParameterIndex(742), - /* return_matcher_indices */ MatcherIndicesIndex(921), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [236] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 1, - /* num_templates */ 3, - /* templates */ TemplateIndex(26), - /* parameters */ ParameterIndex(14), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [237] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 1, - /* num_templates */ 4, - /* templates */ TemplateIndex(96), - /* parameters */ ParameterIndex(743), - /* return_matcher_indices */ MatcherIndicesIndex(927), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [238] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 1, - /* num_templates */ 4, - /* templates */ TemplateIndex(26), - /* parameters */ ParameterIndex(14), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [239] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 1, - /* num_templates */ 5, - /* templates */ TemplateIndex(26), - /* parameters */ ParameterIndex(695), - /* return_matcher_indices */ MatcherIndicesIndex(936), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [240] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 1, - /* templates */ TemplateIndex(31), - /* parameters */ ParameterIndex(4), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [241] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(146), - /* parameters */ ParameterIndex(698), - /* return_matcher_indices */ MatcherIndicesIndex(817), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [242] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 1, - /* templates */ TemplateIndex(31), - /* parameters */ ParameterIndex(4), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [243] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(146), - /* parameters */ ParameterIndex(698), - /* return_matcher_indices */ MatcherIndicesIndex(817), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [244] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 1, - /* templates */ TemplateIndex(31), - /* parameters */ ParameterIndex(4), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [245] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(146), - /* parameters */ ParameterIndex(701), - /* return_matcher_indices */ MatcherIndicesIndex(817), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [246] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(31), - /* parameters */ ParameterIndex(13), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [247] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(30), - /* parameters */ ParameterIndex(690), - /* return_matcher_indices */ MatcherIndicesIndex(909), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [248] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(169), - /* parameters */ ParameterIndex(745), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [249] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(152), - /* parameters */ ParameterIndex(747), - /* return_matcher_indices */ MatcherIndicesIndex(817), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [250] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(155), - /* parameters */ ParameterIndex(749), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [251] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 4, - /* templates */ TemplateIndex(100), - /* parameters */ ParameterIndex(751), - /* return_matcher_indices */ MatcherIndicesIndex(921), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [252] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 4, - /* num_explicit_templates */ 0, - /* num_templates */ 1, - /* templates */ TemplateIndex(27), - /* parameters */ ParameterIndex(600), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [253] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 4, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(150), - /* parameters */ ParameterIndex(604), - /* return_matcher_indices */ MatcherIndicesIndex(817), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [254] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 1, - /* templates */ TemplateIndex(27), - /* parameters */ ParameterIndex(705), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [255] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(150), - /* parameters */ ParameterIndex(708), - /* return_matcher_indices */ MatcherIndicesIndex(817), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [256] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 1, - /* num_templates */ 3, - /* templates */ TemplateIndex(104), - /* parameters */ ParameterIndex(14), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [257] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 1, - /* num_templates */ 4, - /* templates */ TemplateIndex(104), - /* parameters */ ParameterIndex(743), - /* return_matcher_indices */ MatcherIndicesIndex(927), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [258] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(105), - /* parameters */ ParameterIndex(13), - /* return_matcher_indices */ MatcherIndicesIndex(858), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [259] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(105), - /* parameters */ ParameterIndex(741), - /* return_matcher_indices */ MatcherIndicesIndex(951), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [260] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 2, - /* templates */ TemplateIndex(158), - /* parameters */ ParameterIndex(1), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [261] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 3, - /* templates */ TemplateIndex(158), - /* parameters */ ParameterIndex(742), - /* return_matcher_indices */ MatcherIndicesIndex(921), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [262] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 2, - /* templates */ TemplateIndex(161), - /* parameters */ ParameterIndex(1), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [263] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 3, - /* templates */ TemplateIndex(161), - /* parameters */ ParameterIndex(742), - /* return_matcher_indices */ MatcherIndicesIndex(921), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [264] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 2, - /* templates */ TemplateIndex(104), - /* parameters */ ParameterIndex(1), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [265] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 3, - /* templates */ TemplateIndex(164), - /* parameters */ ParameterIndex(742), - /* return_matcher_indices */ MatcherIndicesIndex(921), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [266] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(167), - /* parameters */ ParameterIndex(711), - /* return_matcher_indices */ MatcherIndicesIndex(533), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [267] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(112), - /* parameters */ ParameterIndex(8), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [268] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(30), - /* parameters */ ParameterIndex(689), - /* return_matcher_indices */ MatcherIndicesIndex(8), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [269] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 7, - /* templates */ TemplateIndex(3), - /* parameters */ ParameterIndex(765), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [270] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 1, - /* num_explicit_templates */ 1, - /* num_templates */ 7, - /* templates */ TemplateIndex(3), - /* parameters */ ParameterIndex(766), - /* return_matcher_indices */ MatcherIndicesIndex(43), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [271] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 4, - /* templates */ TemplateIndex(92), - /* parameters */ ParameterIndex(735), - /* return_matcher_indices */ MatcherIndicesIndex(869), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [272] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(146), - /* parameters */ ParameterIndex(737), - /* return_matcher_indices */ MatcherIndicesIndex(881), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [273] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(146), - /* parameters */ ParameterIndex(739), - /* return_matcher_indices */ MatcherIndicesIndex(921), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [274] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(146), - /* parameters */ ParameterIndex(703), - /* return_matcher_indices */ MatcherIndicesIndex(921), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [275] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 2, - /* templates */ TemplateIndex(146), - /* parameters */ ParameterIndex(699), - /* return_matcher_indices */ MatcherIndicesIndex(817), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [276] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 2, - /* num_explicit_templates */ 0, - /* num_templates */ 3, - /* templates */ TemplateIndex(146), - /* parameters */ ParameterIndex(740), - /* return_matcher_indices */ MatcherIndicesIndex(877), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [277] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 0, - /* templates */ TemplateIndex(/* invalid */), - /* parameters */ ParameterIndex(299), - /* return_matcher_indices */ MatcherIndicesIndex(524), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [278] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), - /* num_parameters */ 3, - /* num_explicit_templates */ 0, - /* num_templates */ 0, - /* templates */ TemplateIndex(/* invalid */), - /* parameters */ ParameterIndex(299), - /* return_matcher_indices */ MatcherIndicesIndex(533), - /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), - }, - { - /* [279] */ - /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), /* num_parameters */ 4, /* num_explicit_templates */ 1, /* num_templates */ 5, @@ -10251,13 +9679,673 @@ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, { + /* [222] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 4, + /* num_explicit_templates */ 1, + /* num_templates */ 5, + /* templates */ TemplateIndex(38), + /* parameters */ ParameterIndex(612), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [223] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 4, + /* num_explicit_templates */ 1, + /* num_templates */ 5, + /* templates */ TemplateIndex(43), + /* parameters */ ParameterIndex(616), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [224] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 5, + /* num_explicit_templates */ 0, + /* num_templates */ 4, + /* templates */ TemplateIndex(34), + /* parameters */ ParameterIndex(297), + /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [225] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 5, + /* num_explicit_templates */ 0, + /* num_templates */ 4, + /* templates */ TemplateIndex(39), + /* parameters */ ParameterIndex(302), + /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [226] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 5, + /* num_explicit_templates */ 0, + /* num_templates */ 4, + /* templates */ TemplateIndex(44), + /* parameters */ ParameterIndex(307), + /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [227] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(0), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [228] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(624), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [229] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 4, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(312), + /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [230] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 4, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(316), + /* return_matcher_indices */ MatcherIndicesIndex(/* invalid */), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [231] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 4, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(312), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [232] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 4, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(316), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [233] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 6, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(0), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [234] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 6, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(8), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [235] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 0, + /* num_templates */ 1, + /* templates */ TemplateIndex(31), + /* parameters */ ParameterIndex(4), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [236] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(30), + /* parameters */ ParameterIndex(697), + /* return_matcher_indices */ MatcherIndicesIndex(917), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [237] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 2, + /* templates */ TemplateIndex(26), + /* parameters */ ParameterIndex(1), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [238] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 3, + /* templates */ TemplateIndex(152), + /* parameters */ ParameterIndex(750), + /* return_matcher_indices */ MatcherIndicesIndex(929), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [239] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 1, + /* num_templates */ 3, + /* templates */ TemplateIndex(26), + /* parameters */ ParameterIndex(14), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [240] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 1, + /* num_templates */ 4, + /* templates */ TemplateIndex(103), + /* parameters */ ParameterIndex(751), + /* return_matcher_indices */ MatcherIndicesIndex(935), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [241] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 1, + /* num_templates */ 4, + /* templates */ TemplateIndex(26), + /* parameters */ ParameterIndex(14), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [242] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 1, + /* num_templates */ 5, + /* templates */ TemplateIndex(26), + /* parameters */ ParameterIndex(703), + /* return_matcher_indices */ MatcherIndicesIndex(944), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [243] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 1, + /* templates */ TemplateIndex(31), + /* parameters */ ParameterIndex(4), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [244] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(149), + /* parameters */ ParameterIndex(706), + /* return_matcher_indices */ MatcherIndicesIndex(817), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [245] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 1, + /* templates */ TemplateIndex(31), + /* parameters */ ParameterIndex(4), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [246] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(149), + /* parameters */ ParameterIndex(706), + /* return_matcher_indices */ MatcherIndicesIndex(817), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [247] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 1, + /* templates */ TemplateIndex(31), + /* parameters */ ParameterIndex(4), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [248] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(149), + /* parameters */ ParameterIndex(709), + /* return_matcher_indices */ MatcherIndicesIndex(817), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [249] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(31), + /* parameters */ ParameterIndex(13), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [250] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(30), + /* parameters */ ParameterIndex(698), + /* return_matcher_indices */ MatcherIndicesIndex(917), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [251] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(172), + /* parameters */ ParameterIndex(753), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [252] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(155), + /* parameters */ ParameterIndex(755), + /* return_matcher_indices */ MatcherIndicesIndex(817), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [253] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(158), + /* parameters */ ParameterIndex(757), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [254] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 4, + /* templates */ TemplateIndex(107), + /* parameters */ ParameterIndex(759), + /* return_matcher_indices */ MatcherIndicesIndex(929), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [255] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 4, + /* num_explicit_templates */ 0, + /* num_templates */ 1, + /* templates */ TemplateIndex(27), + /* parameters */ ParameterIndex(600), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [256] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 4, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(153), + /* parameters */ ParameterIndex(604), + /* return_matcher_indices */ MatcherIndicesIndex(817), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [257] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 1, + /* templates */ TemplateIndex(27), + /* parameters */ ParameterIndex(713), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [258] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(153), + /* parameters */ ParameterIndex(716), + /* return_matcher_indices */ MatcherIndicesIndex(817), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [259] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 1, + /* num_templates */ 3, + /* templates */ TemplateIndex(111), + /* parameters */ ParameterIndex(14), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [260] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 1, + /* num_templates */ 4, + /* templates */ TemplateIndex(111), + /* parameters */ ParameterIndex(751), + /* return_matcher_indices */ MatcherIndicesIndex(935), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [261] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(112), + /* parameters */ ParameterIndex(13), + /* return_matcher_indices */ MatcherIndicesIndex(858), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [262] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(112), + /* parameters */ ParameterIndex(749), + /* return_matcher_indices */ MatcherIndicesIndex(959), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [263] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 2, + /* templates */ TemplateIndex(161), + /* parameters */ ParameterIndex(1), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [264] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 3, + /* templates */ TemplateIndex(161), + /* parameters */ ParameterIndex(750), + /* return_matcher_indices */ MatcherIndicesIndex(929), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [265] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 2, + /* templates */ TemplateIndex(164), + /* parameters */ ParameterIndex(1), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [266] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 3, + /* templates */ TemplateIndex(164), + /* parameters */ ParameterIndex(750), + /* return_matcher_indices */ MatcherIndicesIndex(929), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [267] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 2, + /* templates */ TemplateIndex(111), + /* parameters */ ParameterIndex(1), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [268] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 3, + /* templates */ TemplateIndex(167), + /* parameters */ ParameterIndex(750), + /* return_matcher_indices */ MatcherIndicesIndex(929), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [269] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(170), + /* parameters */ ParameterIndex(719), + /* return_matcher_indices */ MatcherIndicesIndex(533), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [270] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(115), + /* parameters */ ParameterIndex(8), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [271] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(30), + /* parameters */ ParameterIndex(697), + /* return_matcher_indices */ MatcherIndicesIndex(8), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [272] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 7, + /* templates */ TemplateIndex(3), + /* parameters */ ParameterIndex(773), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [273] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 1, + /* num_explicit_templates */ 1, + /* num_templates */ 7, + /* templates */ TemplateIndex(3), + /* parameters */ ParameterIndex(774), + /* return_matcher_indices */ MatcherIndicesIndex(43), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [274] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 4, + /* templates */ TemplateIndex(99), + /* parameters */ ParameterIndex(743), + /* return_matcher_indices */ MatcherIndicesIndex(869), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [275] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(149), + /* parameters */ ParameterIndex(745), + /* return_matcher_indices */ MatcherIndicesIndex(881), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [276] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(149), + /* parameters */ ParameterIndex(747), + /* return_matcher_indices */ MatcherIndicesIndex(929), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [277] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(149), + /* parameters */ ParameterIndex(711), + /* return_matcher_indices */ MatcherIndicesIndex(929), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [278] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 2, + /* templates */ TemplateIndex(149), + /* parameters */ ParameterIndex(707), + /* return_matcher_indices */ MatcherIndicesIndex(817), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [279] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 2, + /* num_explicit_templates */ 0, + /* num_templates */ 3, + /* templates */ TemplateIndex(149), + /* parameters */ ParameterIndex(748), + /* return_matcher_indices */ MatcherIndicesIndex(877), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { /* [280] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 0, + /* templates */ TemplateIndex(/* invalid */), + /* parameters */ ParameterIndex(299), + /* return_matcher_indices */ MatcherIndicesIndex(524), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [281] */ + /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline), + /* num_parameters */ 3, + /* num_explicit_templates */ 0, + /* num_templates */ 0, + /* templates */ TemplateIndex(/* invalid */), + /* parameters */ ParameterIndex(299), + /* return_matcher_indices */ MatcherIndicesIndex(533), + /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), + }, + { + /* [282] */ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse), /* num_parameters */ 4, /* num_explicit_templates */ 0, /* num_templates */ 5, - /* templates */ TemplateIndex(38), - /* parameters */ ParameterIndex(612), + /* templates */ TemplateIndex(48), + /* parameters */ ParameterIndex(620), /* return_matcher_indices */ MatcherIndicesIndex(842), /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */), }, @@ -10271,116 +10359,116 @@ /* [0] */ /* fn array_length[I : u32, A : access](ptr<storage, struct_with_runtime_array, A>, I) -> u32 */ /* num overloads */ 1, - /* overloads */ OverloadIndex(266), + /* overloads */ OverloadIndex(269), }, { /* [1] */ /* fn atomic_load[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U) -> T */ /* fn atomic_load[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, readable>, U, U) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(224), + /* overloads */ OverloadIndex(227), }, { /* [2] */ /* fn atomic_store[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) */ /* fn atomic_store[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) */ /* num overloads */ 2, - /* overloads */ OverloadIndex(226), + /* overloads */ OverloadIndex(229), }, { /* [3] */ /* fn atomic_exchange[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_exchange[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [4] */ /* fn atomic_compare_exchange[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, U, T, T) -> T */ /* fn atomic_compare_exchange[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, U, T, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(230), + /* overloads */ OverloadIndex(233), }, { /* [5] */ /* fn atomic_i_add[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_i_add[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [6] */ /* fn atomic_i_sub[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_i_sub[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [7] */ /* fn atomic_s_max[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_s_max[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [8] */ /* fn atomic_s_min[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_s_min[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [9] */ /* fn atomic_u_max[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_u_max[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [10] */ /* fn atomic_u_min[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_u_min[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [11] */ /* fn atomic_and[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_and[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [12] */ /* fn atomic_or[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_or[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [13] */ /* fn atomic_xor[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, U, U, T) -> T */ /* fn atomic_xor[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U, T) -> T */ /* num overloads */ 2, - /* overloads */ OverloadIndex(228), + /* overloads */ OverloadIndex(231), }, { /* [14] */ /* fn atomic_i_increment[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U) -> T */ /* num overloads */ 1, - /* overloads */ OverloadIndex(267), + /* overloads */ OverloadIndex(270), }, { /* [15] */ /* fn atomic_i_decrement[T : iu32, U : u32, S : workgroup_or_storage](ptr<S, T, writable>, U, U) -> T */ /* num overloads */ 1, - /* overloads */ OverloadIndex(267), + /* overloads */ OverloadIndex(270), }, { /* [16] */ /* fn dot[N : num, T : f32_f16](vec<N, T>, vec<N, T>) -> T */ /* num overloads */ 1, - /* overloads */ OverloadIndex(268), + /* overloads */ OverloadIndex(271), }, { /* [17] */ @@ -10467,13 +10555,13 @@ /* [22] */ /* fn image_query_levels<Z : iu32>[T : fiu32, D : depth, R : arrayed, S : sampled, F : texel_format, A : access](image: image<T, dim_1d_2d_3d_or_cube, D, R, single_sampled, S, F, A>) -> Z */ /* num overloads */ 1, - /* overloads */ OverloadIndex(269), + /* overloads */ OverloadIndex(272), }, { /* [23] */ /* fn image_query_samples<Z : iu32>[T : fiu32, D : depth, R : arrayed, S : sampled, F : texel_format, A : access](image: image<T, dim_2d, D, R, multi_sampled, S, F, A>) -> Z */ /* num overloads */ 1, - /* overloads */ OverloadIndex(270), + /* overloads */ OverloadIndex(273), }, { /* [24] */ @@ -10683,19 +10771,19 @@ /* [33] */ /* fn matrix_times_matrix[T : f32_f16, K : num, C : num, R : num](mat<K, R, T>, mat<C, K, T>) -> mat<C, R, T> */ /* num overloads */ 1, - /* overloads */ OverloadIndex(271), + /* overloads */ OverloadIndex(274), }, { /* [34] */ /* fn matrix_times_scalar[T : f32_f16, N : num, M : num](mat<N, M, T>, T) -> mat<N, M, T> */ /* num overloads */ 1, - /* overloads */ OverloadIndex(272), + /* overloads */ OverloadIndex(275), }, { /* [35] */ /* fn matrix_times_vector[T : f32_f16, N : num, M : num](mat<N, M, T>, vec<N, T>) -> vec<M, T> */ /* num overloads */ 1, - /* overloads */ OverloadIndex(273), + /* overloads */ OverloadIndex(276), }, { /* [36] */ @@ -10709,20 +10797,20 @@ /* [37] */ /* fn vector_times_matrix[T : f32_f16, N : num, M : num](vec<N, T>, mat<M, N, T>) -> vec<M, T> */ /* num overloads */ 1, - /* overloads */ OverloadIndex(274), + /* overloads */ OverloadIndex(277), }, { /* [38] */ /* fn vector_times_scalar[T : f32_f16, N : num](vec<N, T>, T) -> vec<N, T> */ /* num overloads */ 1, - /* overloads */ OverloadIndex(275), + /* overloads */ OverloadIndex(278), }, { /* [39] */ /* fn normalize[T : f32_f16](T) -> T */ /* fn normalize[N : num, T : f32_f16](vec<N, T>) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(232), + /* overloads */ OverloadIndex(235), }, { /* [40] */ @@ -10737,360 +10825,362 @@ /* fn sign<R : iu32>[T : iu32](T) -> R */ /* fn sign<R : iu32>[T : iu32, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(234), + /* overloads */ OverloadIndex(237), }, { /* [42] */ /* fn abs<R : iu32>[T : iu32](T) -> R */ /* fn abs<R : iu32>[T : iu32, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(234), + /* overloads */ OverloadIndex(237), }, { /* [43] */ /* fn s_max<R : iu32>[T : iu32, U : iu32](T, U) -> R */ /* fn s_max<R : iu32>[T : iu32, U : iu32, N : num](vec<N, T>, vec<N, U>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(236), + /* overloads */ OverloadIndex(239), }, { /* [44] */ /* fn s_min<R : iu32>[T : iu32, U : iu32](T, U) -> R */ /* fn s_min<R : iu32>[T : iu32, U : iu32, N : num](vec<N, T>, vec<N, U>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(236), + /* overloads */ OverloadIndex(239), }, { /* [45] */ /* fn s_clamp<R : iu32>[T : iu32, U : iu32, V : iu32](T, U, V) -> R */ /* fn s_clamp<R : iu32>[T : iu32, U : iu32, V : iu32, N : num](vec<N, T>, vec<N, U>, vec<N, V>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(238), + /* overloads */ OverloadIndex(241), }, { /* [46] */ /* fn u_max<R : iu32>[T : iu32, U : iu32](T, U) -> R */ /* fn u_max<R : iu32>[T : iu32, U : iu32, N : num](vec<N, T>, vec<N, U>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(236), + /* overloads */ OverloadIndex(239), }, { /* [47] */ /* fn u_min<R : iu32>[T : iu32, U : iu32](T, U) -> R */ /* fn u_min<R : iu32>[T : iu32, U : iu32, N : num](vec<N, T>, vec<N, U>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(236), + /* overloads */ OverloadIndex(239), }, { /* [48] */ /* fn u_clamp<R : iu32>[T : iu32, U : iu32, V : iu32](T, U, V) -> R */ /* fn u_clamp<R : iu32>[T : iu32, U : iu32, V : iu32, N : num](vec<N, T>, vec<N, U>, vec<N, V>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(238), + /* overloads */ OverloadIndex(241), }, { /* [49] */ /* fn find_i_lsb<R : iu32>[T : iu32](T) -> R */ /* fn find_i_lsb<R : iu32>[T : iu32, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(234), + /* overloads */ OverloadIndex(237), }, { /* [50] */ /* fn find_s_msb<R : iu32>[T : iu32](T) -> R */ /* fn find_s_msb<R : iu32>[T : iu32, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(234), + /* overloads */ OverloadIndex(237), }, { /* [51] */ /* fn find_u_msb<R : iu32>[T : iu32](T) -> R */ /* fn find_u_msb<R : iu32>[T : iu32, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(234), + /* overloads */ OverloadIndex(237), }, { /* [52] */ /* fn refract[T : f32_f16](T, T, T) -> T */ /* fn refract[T : f32_f16, N : num](vec<N, T>, vec<N, T>, T) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(240), + /* overloads */ OverloadIndex(243), }, { /* [53] */ /* fn reflect[T : f32_f16](T, T) -> T */ /* fn reflect[T : f32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(242), + /* overloads */ OverloadIndex(245), }, { /* [54] */ /* fn face_forward[T : f32_f16](T, T, T) -> T */ /* fn face_forward[T : f32_f16, N : num](vec<N, T>, vec<N, T>, vec<N, T>) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(244), + /* overloads */ OverloadIndex(247), }, { /* [55] */ /* fn ldexp[T : f32_f16, U : iu32](T, U) -> T */ /* fn ldexp[N : num, T : f32_f16, U : iu32](vec<N, T>, vec<N, U>) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(246), + /* overloads */ OverloadIndex(249), }, { /* [56] */ /* fn modf[T : f32_f16, S : function_private_workgroup_storage](x: T, i: ptr<S, T, writable>) -> T */ /* fn modf[T : f32_f16, N : num, S : function_private_workgroup_storage](x: vec<N, T>, i: ptr<S, vec<N, T>, writable>) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(248), + /* overloads */ OverloadIndex(251), }, { /* [57] */ /* fn frexp[T : f32_f16, R : iu32, S : function_private_workgroup_storage](x: T, i: ptr<S, R, writable>) -> T */ /* fn frexp[T : f32_f16, R : iu32, N : num, S : function_private_workgroup_storage](x: vec<N, T>, i: ptr<S, vec<N, R>, writable>) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(250), + /* overloads */ OverloadIndex(253), }, { /* [58] */ /* fn bit_count<R : iu32>[T : iu32](T) -> R */ /* fn bit_count<R : iu32>[T : iu32, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(234), + /* overloads */ OverloadIndex(237), }, { /* [59] */ /* fn bit_field_insert[T : iu32](base: T, insert: T, offset: iu32, count: iu32) -> T */ /* fn bit_field_insert[T : iu32, N : num](base: vec<N, T>, insert: vec<N, T>, offset: iu32, count: iu32) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(252), + /* overloads */ OverloadIndex(255), }, { /* [60] */ /* fn bit_field_s_extract[T : iu32](base: T, offset: iu32, count: iu32) -> T */ /* fn bit_field_s_extract[T : iu32, N : num](base: vec<N, T>, offset: iu32, count: iu32) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(254), + /* overloads */ OverloadIndex(257), }, { /* [61] */ /* fn bit_field_u_extract[T : iu32](base: T, offset: iu32, count: iu32) -> T */ /* fn bit_field_u_extract[T : iu32, N : num](base: vec<N, T>, offset: iu32, count: iu32) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(254), + /* overloads */ OverloadIndex(257), }, { /* [62] */ /* fn add<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn add<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [63] */ /* fn sub<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn sub<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [64] */ /* fn mul<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn mul<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [65] */ /* fn s_div<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn s_div<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [66] */ /* fn s_mod<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn s_mod<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [67] */ /* fn s_greater_than[A : iu32, B : iu32](A, B) -> bool */ /* fn s_greater_than[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [68] */ /* fn s_greater_than_equal[A : iu32, B : iu32](A, B) -> bool */ /* fn s_greater_than_equal[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [69] */ /* fn s_less_than[A : iu32, B : iu32](A, B) -> bool */ /* fn s_less_than[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [70] */ /* fn s_less_than_equal[A : iu32, B : iu32](A, B) -> bool */ /* fn s_less_than_equal[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [71] */ /* fn u_greater_than[A : iu32, B : iu32](A, B) -> bool */ /* fn u_greater_than[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [72] */ /* fn u_greater_than_equal[A : iu32, B : iu32](A, B) -> bool */ /* fn u_greater_than_equal[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [73] */ /* fn u_less_than[A : iu32, B : iu32](A, B) -> bool */ /* fn u_less_than[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [74] */ /* fn u_less_than_equal[A : iu32, B : iu32](A, B) -> bool */ /* fn u_less_than_equal[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [75] */ /* fn convert_f_to_s<R : iu32>[T : f32_f16](T) -> R */ /* fn convert_f_to_s<R : iu32>[T : f32_f16, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(260), + /* overloads */ OverloadIndex(263), }, { /* [76] */ /* fn convert_s_to_f<R : f32_f16>[T : iu32](T) -> R */ /* fn convert_s_to_f<R : f32_f16>[T : iu32, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(262), + /* overloads */ OverloadIndex(265), }, { /* [77] */ /* fn convert_u_to_f<R : f32_f16>[T : iu32](T) -> R */ /* fn convert_u_to_f<R : f32_f16>[T : iu32, N : num](vec<N, T>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(262), + /* overloads */ OverloadIndex(265), }, { /* [78] */ /* fn bitwise_and<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn bitwise_and<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [79] */ /* fn bitwise_or<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn bitwise_or<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [80] */ /* fn bitwise_xor<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn bitwise_xor<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [81] */ /* fn equal[A : iu32, B : iu32](A, B) -> bool */ /* fn equal[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [82] */ /* fn not_equal[A : iu32, B : iu32](A, B) -> bool */ /* fn not_equal[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, bool> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(258), + /* overloads */ OverloadIndex(261), }, { /* [83] */ /* fn shift_left_logical<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn shift_left_logical<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [84] */ /* fn shift_right_logical<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn shift_right_logical<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [85] */ /* fn shift_right_arithmetic<R : iu32>[A : iu32, B : iu32](A, B) -> R */ /* fn shift_right_arithmetic<R : iu32>[A : iu32, B : iu32, N : num](vec<N, A>, vec<N, B>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(256), + /* overloads */ OverloadIndex(259), }, { /* [86] */ /* fn not<R : iu32>[A : iu32](A) -> R */ /* fn not<R : iu32>[A : iu32, N : num](vec<N, A>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(264), + /* overloads */ OverloadIndex(267), }, { /* [87] */ /* fn s_negate<R : iu32>[A : iu32](A) -> R */ /* fn s_negate<R : iu32>[A : iu32, N : num](vec<N, A>) -> vec<N, R> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(264), + /* overloads */ OverloadIndex(267), }, { /* [88] */ /* fn f_mod[T : f32_f16](T, T) -> T */ /* fn f_mod[T : f32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, T> */ /* num overloads */ 2, - /* overloads */ OverloadIndex(242), + /* overloads */ OverloadIndex(245), }, { /* [89] */ /* fn outer_product[T : f32_f16, N : num, M : num](vec<N, T>, vec<M, T>) -> mat<M, N, T> */ /* num overloads */ 1, - /* overloads */ OverloadIndex(276), + /* overloads */ OverloadIndex(279), }, { /* [90] */ /* fn s_dot(u32, u32, u32) -> i32 */ /* num overloads */ 1, - /* overloads */ OverloadIndex(277), + /* overloads */ OverloadIndex(280), }, { /* [91] */ /* fn u_dot(u32, u32, u32) -> u32 */ /* num overloads */ 1, - /* overloads */ OverloadIndex(278), + /* overloads */ OverloadIndex(281), }, { /* [92] */ /* fn cooperative_matrix_load<T : subgroup_matrix<K, S, C, R>>[K : subgroup_matrix_kind, S : fiu32_f16, C : num, R : num](ptr<workgroup_or_storage, S, readable>, u32, u32, u32) -> T */ - /* num overloads */ 1, - /* overloads */ OverloadIndex(279), + /* fn cooperative_matrix_load<T : subgroup_matrix<K, S, C, R>>[K : subgroup_matrix_kind, S : i8, C : num, R : num](ptr<workgroup_or_storage, i32, readable>, u32, u32, u32) -> T */ + /* fn cooperative_matrix_load<T : subgroup_matrix<K, S, C, R>>[K : subgroup_matrix_kind, S : u8, C : num, R : num](ptr<workgroup_or_storage, u32, readable>, u32, u32, u32) -> T */ + /* num overloads */ 3, + /* overloads */ OverloadIndex(221), }, { /* [93] */ @@ -11098,13 +11188,13 @@ /* fn cooperative_matrix_store[K : subgroup_matrix_kind, S : i8, C : num, R : num](ptr<workgroup_or_storage, i32, writable>, subgroup_matrix<K, S, C, R>, u32, u32, u32) */ /* fn cooperative_matrix_store[K : subgroup_matrix_kind, S : u8, C : num, R : num](ptr<workgroup_or_storage, u32, writable>, subgroup_matrix<K, S, C, R>, u32, u32, u32) */ /* num overloads */ 3, - /* overloads */ OverloadIndex(221), + /* overloads */ OverloadIndex(224), }, { /* [94] */ /* fn cooperative_matrix_mul_add[T : subgroup_matrix_elements, TR : subgroup_matrix_elements, C : num, R : num, K : num](subgroup_matrix<subgroup_matrix_kind_left, T, K, R>, subgroup_matrix<subgroup_matrix_kind_right, T, C, K>, subgroup_matrix<subgroup_matrix_kind_result, TR, C, R>, u32) -> subgroup_matrix<subgroup_matrix_kind_result, TR, C, R> */ /* num overloads */ 1, - /* overloads */ OverloadIndex(280), + /* overloads */ OverloadIndex(282), }, };
diff --git a/src/tint/lang/spirv/spirv.def b/src/tint/lang/spirv/spirv.def index 2b242aa..07cbec5 100644 --- a/src/tint/lang/spirv/spirv.def +++ b/src/tint/lang/spirv/spirv.def
@@ -1667,6 +1667,12 @@ @stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num) fn cooperative_matrix_load<T: subgroup_matrix<K, S, C, R> >( ptr<workgroup_or_storage, S, readable>, u32, u32, u32) -> T +@stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num) + fn cooperative_matrix_load<T: subgroup_matrix<K, S, C, R> >( + ptr<workgroup_or_storage, i32, readable>, u32, u32, u32) -> T +@stage("compute") implicit(K: subgroup_matrix_kind, S: u8, C: num, R: num) + fn cooperative_matrix_load<T: subgroup_matrix<K, S, C, R> >( + ptr<workgroup_or_storage, u32, readable>, u32, u32, u32) -> T @stage("compute") implicit(K: subgroup_matrix_kind, S: fiu32_f16, C: num, R: num) fn cooperative_matrix_store( ptr<workgroup_or_storage, S, writable>, subgroup_matrix<K, S, C, R>, u32, u32, u32) @stage("compute") implicit(K: subgroup_matrix_kind, S: i8, C: num, R: num) fn cooperative_matrix_store(
diff --git a/src/tint/lang/spirv/writer/raise/builtin_polyfill_test.cc b/src/tint/lang/spirv/writer/raise/builtin_polyfill_test.cc index 040f681..07fd998 100644 --- a/src/tint/lang/spirv/writer/raise/builtin_polyfill_test.cc +++ b/src/tint/lang/spirv/writer/raise/builtin_polyfill_test.cc
@@ -3985,6 +3985,80 @@ EXPECT_EQ(expect, str()); } +TEST_F(SpirvWriter_BuiltinPolyfillTest, SubgroupMatrixLoad_Storage_ColMajor_I8) { + auto* mat = ty.subgroup_matrix_result(ty.i8(), 8, 8); + auto* p = b.FunctionParam<ptr<storage, array<i32, 256>>>("p"); + auto* func = b.Function("foo", mat); + func->SetParams({p}); + b.Append(func->Block(), [&] { + auto* call = b.CallExplicit(mat, core::BuiltinFn::kSubgroupMatrixLoad, Vector{mat}, p, 64_u, + true, 32_u); + b.Return(func, call); + }); + + auto* src = R"( +%foo = func(%p:ptr<storage, array<i32, 256>, read_write>):subgroup_matrix_result<i8, 8, 8> { + $B1: { + %3:subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>> %p, 64u, true, 32u + ret %3 + } +} +)"; + EXPECT_EQ(src, str()); + + auto* expect = R"( +%foo = func(%p:ptr<storage, array<i32, 256>, read_write>):subgroup_matrix_result<i8, 8, 8> { + $B1: { + %3:ptr<storage, i32, read_write> = access %p, 64u + %4:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %3, 1u, 32u, 32u + ret %4 + } +} +)"; + + PolyfillConfig config{.use_vulkan_memory_model = true}; + Run(BuiltinPolyfill, config); + + EXPECT_EQ(expect, str()); +} + +TEST_F(SpirvWriter_BuiltinPolyfillTest, SubgroupMatrixLoad_Workgroup_RowMajor_U8) { + auto* mat = ty.subgroup_matrix_result(ty.u8(), 8, 8); + auto* p = b.FunctionParam<ptr<workgroup, array<u32, 256>>>("p"); + auto* func = b.Function("foo", mat); + func->SetParams({p}); + b.Append(func->Block(), [&] { + auto* call = b.CallExplicit(mat, core::BuiltinFn::kSubgroupMatrixLoad, Vector{mat}, p, 64_u, + false, 32_u); + b.Return(func, call); + }); + + auto* src = R"( +%foo = func(%p:ptr<workgroup, array<u32, 256>, read_write>):subgroup_matrix_result<u8, 8, 8> { + $B1: { + %3:subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>> %p, 64u, false, 32u + ret %3 + } +} +)"; + EXPECT_EQ(src, str()); + + auto* expect = R"( +%foo = func(%p:ptr<workgroup, array<u32, 256>, read_write>):subgroup_matrix_result<u8, 8, 8> { + $B1: { + %3:ptr<workgroup, u32, read_write> = access %p, 64u + %4:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %3, 0u, 32u, 32u + ret %4 + } +} +)"; + + PolyfillConfig config{.use_vulkan_memory_model = true}; + Run(BuiltinPolyfill, config); + + EXPECT_EQ(expect, str()); +} + TEST_F(SpirvWriter_BuiltinPolyfillTest, SubgroupMatrixStore_Storage_ColMajor_F32) { auto* p = b.FunctionParam<ptr<storage, array<f32, 256>>>("p"); auto* m = b.FunctionParam("m", ty.subgroup_matrix_result(ty.f32(), 8, 8));
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/03a4db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/03a4db.wgsl.expected.spvasm index eb02619..4058ab9 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/03a4db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/03a4db.wgsl.expected.spvasm
@@ -1,100 +1,98 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_03a4db() -> subgroup_matrix_result<i8, 8, 8> { - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_03a4db(), false, 64); -} - -Failed to generate SPIR-V: :27:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_03a4db = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32>, read> = access %sb_ro, 0u - %5:u32 = spirv.array_length %sb_ro, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, i32, read> = access %4, 1u - %13:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_result<i8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_result<i8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_03a4db - %19:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, i32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 56 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_03a4db "subgroupMatrixLoad_03a4db" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %uint_1 = OpConstant %uint 1 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %35 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %47 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_03a4db = OpFunction %13 None %18 + %19 = OpLabel + %33 = OpVariable %_ptr_Function_13 Function %35 + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_ro %uint_0 + %23 = OpArrayLength %uint %sb_ro 0 + %24 = OpIMul %uint %23 %uint_4 + %26 = OpIMul %uint %uint_8 %uint_7 + %28 = OpIAdd %uint %uint_1 %26 + %30 = OpIAdd %uint %28 %uint_8 + %31 = OpULessThanEqual %bool %30 %24 + OpSelectionMerge %37 None + OpBranchConditional %31 %38 %37 + %38 = OpLabel + %42 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %44 = OpCooperativeMatrixLoadKHR %13 %42 %uint_1 %uint_8 NonPrivatePointer + OpStore %33 %44 None + OpBranch %37 + %37 = OpLabel + %39 = OpLoad %13 %33 None + OpStore %res %39 + %41 = OpLoad %13 %res None + OpReturnValue %41 + OpFunctionEnd +%compute_main = OpFunction %void None %47 + %48 = OpLabel + %49 = OpFunctionCall %13 %subgroupMatrixLoad_03a4db + %50 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %52 = OpAccessChain %_ptr_StorageBuffer_int_0 %50 %uint_0 + OpCooperativeMatrixStoreKHR %52 %49 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/0f7739.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/0f7739.wgsl.expected.spvasm index a687835..5459194 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/0f7739.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/0f7739.wgsl.expected.spvasm
@@ -1,100 +1,95 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_0f7739() -> subgroup_matrix_left<i8, 8, 8> { - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_0f7739(), false, 64); -} - -Failed to generate SPIR-V: :27:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_0f7739 = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32>, read_write> = access %sb_rw, 0u - %5:u32 = spirv.array_length %sb_rw, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, i32, read_write> = access %4, 1u - %13:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_left<i8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_left<i8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_0f7739 - %19:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, i32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 54 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_0f7739 "subgroupMatrixLoad_0f7739" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %uint_1 = OpConstant %uint 1 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %34 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %46 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_0f7739 = OpFunction %13 None %18 + %19 = OpLabel + %32 = OpVariable %_ptr_Function_13 Function %34 + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_rw %uint_0 + %22 = OpArrayLength %uint %sb_rw 0 + %23 = OpIMul %uint %22 %uint_4 + %25 = OpIMul %uint %uint_8 %uint_7 + %27 = OpIAdd %uint %uint_1 %25 + %29 = OpIAdd %uint %27 %uint_8 + %30 = OpULessThanEqual %bool %29 %23 + OpSelectionMerge %36 None + OpBranchConditional %30 %37 %36 + %37 = OpLabel + %41 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %43 = OpCooperativeMatrixLoadKHR %13 %41 %uint_1 %uint_8 NonPrivatePointer + OpStore %32 %43 None + OpBranch %36 + %36 = OpLabel + %38 = OpLoad %13 %32 None + OpStore %res %38 + %40 = OpLoad %13 %res None + OpReturnValue %40 + OpFunctionEnd +%compute_main = OpFunction %void None %46 + %47 = OpLabel + %48 = OpFunctionCall %13 %subgroupMatrixLoad_0f7739 + %49 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %51 = OpAccessChain %_ptr_StorageBuffer_int %49 %uint_0 + OpCooperativeMatrixStoreKHR %51 %48 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/122298.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/122298.wgsl.expected.spvasm index 2700871..8a3b081 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/122298.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/122298.wgsl.expected.spvasm
@@ -1,90 +1,76 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_122298() -> subgroup_matrix_left<i8, 8, 8> { - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_122298(), false, 64); -} - -Failed to generate SPIR-V: :22:41 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_122298 = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32, 1024>, read_write> = access %2, 0u, 0u - %5:ptr<storage, i32, read_write> = access %4, 1u - %6:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_left<i8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_122298 - %11:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, i32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 38 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_122298 "subgroupMatrixLoad_122298" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %uint_1 = OpConstant %uint 1 +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %31 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_122298 = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %22 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %25 = OpCooperativeMatrixLoadKHR %13 %22 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %25 + %28 = OpLoad %13 %res None + OpReturnValue %28 + OpFunctionEnd +%compute_main = OpFunction %void None %31 + %32 = OpLabel + %33 = OpFunctionCall %13 %subgroupMatrixLoad_122298 + %34 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %35 = OpAccessChain %_ptr_StorageBuffer_int %34 %uint_0 + OpCooperativeMatrixStoreKHR %35 %33 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/1b3162.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/1b3162.wgsl.expected.spvasm index e3b43c6..1ca4c3e 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/1b3162.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/1b3162.wgsl.expected.spvasm
@@ -1,98 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -var<workgroup> arg_0 : array<i32, 1024>; - -fn subgroupMatrixLoad_1b3162() -> subgroup_matrix_right<i8, 8, 8> { - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_1b3162(), false, 64); -} - -Failed to generate SPIR-V: :13:42 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<workgroup, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %5:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %4, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:11:3 note: in block - $B2: { - ^^^ - -:45:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:20:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %arg_0:ptr<workgroup, array<i32, 1024>, read_write> = var undef -} - -%subgroupMatrixLoad_1b3162 = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %4:ptr<workgroup, i32, read_write> = access %arg_0, 1u - %5:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %4, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %5 - %7:subgroup_matrix_right<i8, 8, 8> = load %res - ret %7 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func(%tint_local_index:u32 [@local_invocation_index]):void { - $B3: { - loop [i: $B4, b: $B5, c: $B6] { # loop_1 - $B4: { # initializer - next_iteration %tint_local_index # -> $B5 - } - $B5 (%idx:u32): { # body - %11:bool = gte %idx, 1024u - if %11 [t: $B7] { # if_1 - $B7: { # true - exit_loop # loop_1 - } - } - %12:ptr<workgroup, i32, read_write> = access %arg_0, %idx - store %12, 0i - continue # -> $B6 - } - $B6: { # continuing - %13:u32 = add %idx, 1u - next_iteration %13 # -> $B5 - } - } - %14:void = workgroupBarrier - %15:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_1b3162 - %16:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %17:ptr<storage, i32, read_write> = access %16, 0u - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpName %arg_0 "arg_0" + OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input" + OpName %subgroupMatrixLoad_1b3162 "subgroupMatrixLoad_1b3162" + OpName %res "res" + OpName %compute_main_inner "compute_main_inner" + OpName %tint_local_index "tint_local_index" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_arr_int_uint_1024_0 = OpTypeArray %int %uint_1024 +%_ptr_Workgroup__arr_int_uint_1024_0 = OpTypePointer Workgroup %_arr_int_uint_1024_0 + %arg_0 = OpVariable %_ptr_Workgroup__arr_int_uint_1024_0 Workgroup +%_ptr_Input_uint = OpTypePointer Input %uint +%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %14 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %19 = OpTypeFunction %14 +%_ptr_Workgroup_int = OpTypePointer Workgroup %int +%_ptr_Function_14 = OpTypePointer Function %14 + %void = OpTypeVoid + %30 = OpTypeFunction %void %uint + %uint_2 = OpConstant %uint 2 + %uint_24840 = OpConstant %uint 24840 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 + %bool = OpTypeBool + %int_0 = OpConstant %int 0 + %57 = OpTypeFunction %void +%subgroupMatrixLoad_1b3162 = OpFunction %14 None %19 + %20 = OpLabel + %res = OpVariable %_ptr_Function_14 Function + %21 = OpAccessChain %_ptr_Workgroup_int %arg_0 %uint_1 + %23 = OpCooperativeMatrixLoadKHR %14 %21 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %23 + %26 = OpLoad %14 %res None + OpReturnValue %26 + OpFunctionEnd +%compute_main_inner = OpFunction %void None %30 +%tint_local_index = OpFunctionParameter %uint + %31 = OpLabel + OpBranch %32 + %32 = OpLabel + OpBranch %35 + %35 = OpLabel + %37 = OpPhi %uint %tint_local_index %32 %38 %34 + OpLoopMerge %36 %34 None + OpBranch %33 + %33 = OpLabel + %50 = OpUGreaterThanEqual %bool %37 %uint_1024 + OpSelectionMerge %52 None + OpBranchConditional %50 %53 %52 + %53 = OpLabel + OpBranch %36 + %52 = OpLabel + %54 = OpAccessChain %_ptr_Workgroup_int %arg_0 %37 + OpStore %54 %int_0 NonPrivatePointer + OpBranch %34 + %34 = OpLabel + %38 = OpIAdd %uint %37 %uint_1 + OpBranch %35 + %36 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_24840 + %42 = OpFunctionCall %14 %subgroupMatrixLoad_1b3162 + %43 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %46 = OpAccessChain %_ptr_StorageBuffer_int %43 %uint_0 + OpCooperativeMatrixStoreKHR %46 %42 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %57 + %58 = OpLabel + %59 = OpLoad %uint %compute_main_local_invocation_index_Input None + %60 = OpFunctionCall %void %compute_main_inner %59 + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/297099.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/297099.wgsl.expected.spvasm index 5198ebe..04253db 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/297099.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/297099.wgsl.expected.spvasm
@@ -1,90 +1,77 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_297099() -> subgroup_matrix_result<i8, 8, 8> { - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_297099(), false, 64); -} - -Failed to generate SPIR-V: :22:43 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_297099 = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32, 1024>, read_write> = access %2, 0u, 0u - %5:ptr<storage, i32, read_write> = access %4, 1u - %6:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_result<i8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_297099 - %11:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, i32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 39 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_297099 "subgroupMatrixLoad_297099" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %uint_1 = OpConstant %uint 1 +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %32 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_297099 = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %23 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %26 = OpCooperativeMatrixLoadKHR %13 %23 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %26 + %29 = OpLoad %13 %res None + OpReturnValue %29 + OpFunctionEnd +%compute_main = OpFunction %void None %32 + %33 = OpLabel + %34 = OpFunctionCall %13 %subgroupMatrixLoad_297099 + %35 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %36 = OpAccessChain %_ptr_StorageBuffer_int %35 %uint_0 + OpCooperativeMatrixStoreKHR %36 %34 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/29f533.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/29f533.wgsl.expected.spvasm index 8395f50..3a2bf16 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/29f533.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/29f533.wgsl.expected.spvasm
@@ -1,100 +1,94 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_29f533() -> subgroup_matrix_left<u8, 8, 8> { - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_29f533(), false, 64); -} - -Failed to generate SPIR-V: :27:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_29f533 = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32>, read_write> = access %sb_rw, 0u - %5:u32 = spirv.array_length %sb_rw, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, u32, read_write> = access %4, 1u - %13:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_left<u8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_left<u8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_29f533 - %19:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, u32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 53 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_29f533 "subgroupMatrixLoad_29f533" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %uint_1 = OpConstant %uint 1 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %33 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %45 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_29f533 = OpFunction %12 None %17 + %18 = OpLabel + %31 = OpVariable %_ptr_Function_12 Function %33 + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_rw %uint_0 + %21 = OpArrayLength %uint %sb_rw 0 + %22 = OpIMul %uint %21 %uint_4 + %24 = OpIMul %uint %uint_8 %uint_7 + %26 = OpIAdd %uint %uint_1 %24 + %28 = OpIAdd %uint %26 %uint_8 + %29 = OpULessThanEqual %bool %28 %22 + OpSelectionMerge %35 None + OpBranchConditional %29 %36 %35 + %36 = OpLabel + %40 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %42 = OpCooperativeMatrixLoadKHR %12 %40 %uint_1 %uint_8 NonPrivatePointer + OpStore %31 %42 None + OpBranch %35 + %35 = OpLabel + %37 = OpLoad %12 %31 None + OpStore %res %37 + %39 = OpLoad %12 %res None + OpReturnValue %39 + OpFunctionEnd +%compute_main = OpFunction %void None %45 + %46 = OpLabel + %47 = OpFunctionCall %12 %subgroupMatrixLoad_29f533 + %48 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %50 = OpAccessChain %_ptr_StorageBuffer_uint %48 %uint_0 + OpCooperativeMatrixStoreKHR %50 %47 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/3f3203.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/3f3203.wgsl.expected.spvasm index 8cd8590..34b6148 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/3f3203.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/3f3203.wgsl.expected.spvasm
@@ -1,90 +1,76 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_3f3203() -> subgroup_matrix_result<u8, 8, 8> { - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_3f3203(), false, 64); -} - -Failed to generate SPIR-V: :22:43 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_3f3203 = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32, 1024>, read_write> = access %2, 0u, 0u - %5:ptr<storage, u32, read_write> = access %4, 1u - %6:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_result<u8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_3f3203 - %11:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, u32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 38 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_3f3203 "subgroupMatrixLoad_3f3203" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %uint_1 = OpConstant %uint 1 +%_ptr_Function_12 = OpTypePointer Function %12 + %void = OpTypeVoid + %31 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_3f3203 = OpFunction %12 None %17 + %18 = OpLabel + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %22 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %25 = OpCooperativeMatrixLoadKHR %12 %22 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %25 + %28 = OpLoad %12 %res None + OpReturnValue %28 + OpFunctionEnd +%compute_main = OpFunction %void None %31 + %32 = OpLabel + %33 = OpFunctionCall %12 %subgroupMatrixLoad_3f3203 + %34 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %35 = OpAccessChain %_ptr_StorageBuffer_uint %34 %uint_0 + OpCooperativeMatrixStoreKHR %35 %33 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/487a88.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/487a88.wgsl.expected.spvasm index 549d339..face314 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/487a88.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/487a88.wgsl.expected.spvasm
@@ -1,98 +1,105 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -var<workgroup> arg_0 : array<u32, 1024>; - -fn subgroupMatrixLoad_487a88() -> subgroup_matrix_right<u8, 8, 8> { - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_487a88(), false, 64); -} - -Failed to generate SPIR-V: :13:42 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<workgroup, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %5:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %4, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:11:3 note: in block - $B2: { - ^^^ - -:45:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:20:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %arg_0:ptr<workgroup, array<u32, 1024>, read_write> = var undef -} - -%subgroupMatrixLoad_487a88 = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %4:ptr<workgroup, u32, read_write> = access %arg_0, 1u - %5:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %4, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %5 - %7:subgroup_matrix_right<u8, 8, 8> = load %res - ret %7 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func(%tint_local_index:u32 [@local_invocation_index]):void { - $B3: { - loop [i: $B4, b: $B5, c: $B6] { # loop_1 - $B4: { # initializer - next_iteration %tint_local_index # -> $B5 - } - $B5 (%idx:u32): { # body - %11:bool = gte %idx, 1024u - if %11 [t: $B7] { # if_1 - $B7: { # true - exit_loop # loop_1 - } - } - %12:ptr<workgroup, u32, read_write> = access %arg_0, %idx - store %12, 0u - continue # -> $B6 - } - $B6: { # continuing - %13:u32 = add %idx, 1u - next_iteration %13 # -> $B5 - } - } - %14:void = workgroupBarrier - %15:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_487a88 - %16:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %17:ptr<storage, u32, read_write> = access %16, 0u - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 59 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpName %arg_0 "arg_0" + OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input" + OpName %subgroupMatrixLoad_487a88 "subgroupMatrixLoad_487a88" + OpName %res "res" + OpName %compute_main_inner "compute_main_inner" + OpName %tint_local_index "tint_local_index" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_arr_uint_uint_1024_0 = OpTypeArray %uint %uint_1024 +%_ptr_Workgroup__arr_uint_uint_1024_0 = OpTypePointer Workgroup %_arr_uint_uint_1024_0 + %arg_0 = OpVariable %_ptr_Workgroup__arr_uint_uint_1024_0 Workgroup +%_ptr_Input_uint = OpTypePointer Input %uint +%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %29 = OpTypeFunction %void %uint + %uint_2 = OpConstant %uint 2 + %uint_24840 = OpConstant %uint 24840 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 + %bool = OpTypeBool + %55 = OpTypeFunction %void +%subgroupMatrixLoad_487a88 = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_Workgroup_uint %arg_0 %uint_1 + %22 = OpCooperativeMatrixLoadKHR %13 %20 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %22 + %25 = OpLoad %13 %res None + OpReturnValue %25 + OpFunctionEnd +%compute_main_inner = OpFunction %void None %29 +%tint_local_index = OpFunctionParameter %uint + %30 = OpLabel + OpBranch %31 + %31 = OpLabel + OpBranch %34 + %34 = OpLabel + %36 = OpPhi %uint %tint_local_index %31 %37 %33 + OpLoopMerge %35 %33 None + OpBranch %32 + %32 = OpLabel + %49 = OpUGreaterThanEqual %bool %36 %uint_1024 + OpSelectionMerge %51 None + OpBranchConditional %49 %52 %51 + %52 = OpLabel + OpBranch %35 + %51 = OpLabel + %53 = OpAccessChain %_ptr_Workgroup_uint %arg_0 %36 + OpStore %53 %uint_0 NonPrivatePointer + OpBranch %33 + %33 = OpLabel + %37 = OpIAdd %uint %36 %uint_1 + OpBranch %34 + %35 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_24840 + %41 = OpFunctionCall %13 %subgroupMatrixLoad_487a88 + %42 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %45 = OpAccessChain %_ptr_StorageBuffer_uint %42 %uint_0 + OpCooperativeMatrixStoreKHR %45 %41 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %55 + %56 = OpLabel + %57 = OpLoad %uint %compute_main_local_invocation_index_Input None + %58 = OpFunctionCall %void %compute_main_inner %57 + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/50572b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/50572b.wgsl.expected.spvasm index 05934ec..892930c 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/50572b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/50572b.wgsl.expected.spvasm
@@ -1,98 +1,105 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -var<workgroup> arg_0 : array<u32, 1024>; - -fn subgroupMatrixLoad_50572b() -> subgroup_matrix_left<u8, 8, 8> { - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_50572b(), false, 64); -} - -Failed to generate SPIR-V: :13:41 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<workgroup, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %5:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %4, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:11:3 note: in block - $B2: { - ^^^ - -:45:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:20:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %arg_0:ptr<workgroup, array<u32, 1024>, read_write> = var undef -} - -%subgroupMatrixLoad_50572b = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %4:ptr<workgroup, u32, read_write> = access %arg_0, 1u - %5:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %4, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %5 - %7:subgroup_matrix_left<u8, 8, 8> = load %res - ret %7 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func(%tint_local_index:u32 [@local_invocation_index]):void { - $B3: { - loop [i: $B4, b: $B5, c: $B6] { # loop_1 - $B4: { # initializer - next_iteration %tint_local_index # -> $B5 - } - $B5 (%idx:u32): { # body - %11:bool = gte %idx, 1024u - if %11 [t: $B7] { # if_1 - $B7: { # true - exit_loop # loop_1 - } - } - %12:ptr<workgroup, u32, read_write> = access %arg_0, %idx - store %12, 0u - continue # -> $B6 - } - $B6: { # continuing - %13:u32 = add %idx, 1u - next_iteration %13 # -> $B5 - } - } - %14:void = workgroupBarrier - %15:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_50572b - %16:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %17:ptr<storage, u32, read_write> = access %16, 0u - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 59 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpName %arg_0 "arg_0" + OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input" + OpName %subgroupMatrixLoad_50572b "subgroupMatrixLoad_50572b" + OpName %res "res" + OpName %compute_main_inner "compute_main_inner" + OpName %tint_local_index "tint_local_index" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_arr_uint_uint_1024_0 = OpTypeArray %uint %uint_1024 +%_ptr_Workgroup__arr_uint_uint_1024_0 = OpTypePointer Workgroup %_arr_uint_uint_1024_0 + %arg_0 = OpVariable %_ptr_Workgroup__arr_uint_uint_1024_0 Workgroup +%_ptr_Input_uint = OpTypePointer Input %uint +%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint + %uint_1 = OpConstant %uint 1 +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %30 = OpTypeFunction %void %uint + %uint_2 = OpConstant %uint 2 + %uint_24840 = OpConstant %uint 24840 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 + %bool = OpTypeBool + %55 = OpTypeFunction %void +%subgroupMatrixLoad_50572b = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_Workgroup_uint %arg_0 %uint_1 + %23 = OpCooperativeMatrixLoadKHR %13 %20 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %23 + %26 = OpLoad %13 %res None + OpReturnValue %26 + OpFunctionEnd +%compute_main_inner = OpFunction %void None %30 +%tint_local_index = OpFunctionParameter %uint + %31 = OpLabel + OpBranch %32 + %32 = OpLabel + OpBranch %35 + %35 = OpLabel + %37 = OpPhi %uint %tint_local_index %32 %38 %34 + OpLoopMerge %36 %34 None + OpBranch %33 + %33 = OpLabel + %49 = OpUGreaterThanEqual %bool %37 %uint_1024 + OpSelectionMerge %51 None + OpBranchConditional %49 %52 %51 + %52 = OpLabel + OpBranch %36 + %51 = OpLabel + %53 = OpAccessChain %_ptr_Workgroup_uint %arg_0 %37 + OpStore %53 %uint_0 NonPrivatePointer + OpBranch %34 + %34 = OpLabel + %38 = OpIAdd %uint %37 %uint_1 + OpBranch %35 + %36 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_24840 + %42 = OpFunctionCall %13 %subgroupMatrixLoad_50572b + %43 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %45 = OpAccessChain %_ptr_StorageBuffer_uint %43 %uint_0 + OpCooperativeMatrixStoreKHR %45 %42 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %55 + %56 = OpLabel + %57 = OpLoad %uint %compute_main_local_invocation_index_Input None + %58 = OpFunctionCall %void %compute_main_inner %57 + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/567359.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/567359.wgsl.expected.spvasm index 82a5a5a..5ba4188 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/567359.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/567359.wgsl.expected.spvasm
@@ -1,100 +1,96 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_567359() -> subgroup_matrix_right<u8, 8, 8> { - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_567359(), false, 64); -} - -Failed to generate SPIR-V: :27:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_567359 = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32>, read> = access %sb_ro, 0u - %5:u32 = spirv.array_length %sb_ro, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, u32, read> = access %4, 1u - %13:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_right<u8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_right<u8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_567359 - %19:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, u32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 54 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_567359 "subgroupMatrixLoad_567359" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %33 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %45 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_567359 = OpFunction %12 None %17 + %18 = OpLabel + %31 = OpVariable %_ptr_Function_12 Function %33 + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_ro %uint_0 + %22 = OpArrayLength %uint %sb_ro 0 + %23 = OpIMul %uint %22 %uint_4 + %25 = OpIMul %uint %uint_8 %uint_7 + %27 = OpIAdd %uint %uint_1 %25 + %28 = OpIAdd %uint %27 %uint_8 + %29 = OpULessThanEqual %bool %28 %23 + OpSelectionMerge %35 None + OpBranchConditional %29 %36 %35 + %36 = OpLabel + %40 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %42 = OpCooperativeMatrixLoadKHR %12 %40 %uint_1 %uint_8 NonPrivatePointer + OpStore %31 %42 None + OpBranch %35 + %35 = OpLabel + %37 = OpLoad %12 %31 None + OpStore %res %37 + %39 = OpLoad %12 %res None + OpReturnValue %39 + OpFunctionEnd +%compute_main = OpFunction %void None %45 + %46 = OpLabel + %47 = OpFunctionCall %12 %subgroupMatrixLoad_567359 + %48 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %50 = OpAccessChain %_ptr_StorageBuffer_uint_0 %48 %uint_0 + OpCooperativeMatrixStoreKHR %50 %47 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/58b2f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/58b2f2.wgsl.expected.spvasm index f0457b6..2b2a231 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/58b2f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/58b2f2.wgsl.expected.spvasm
@@ -1,100 +1,97 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_58b2f2() -> subgroup_matrix_right<i8, 8, 8> { - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_58b2f2(), false, 64); -} - -Failed to generate SPIR-V: :27:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_58b2f2 = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32>, read> = access %sb_ro, 0u - %5:u32 = spirv.array_length %sb_ro, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, i32, read> = access %4, 1u - %13:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_right<i8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_right<i8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_58b2f2 - %19:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, i32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 55 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_58b2f2 "subgroupMatrixLoad_58b2f2" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %34 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %46 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_58b2f2 = OpFunction %13 None %18 + %19 = OpLabel + %32 = OpVariable %_ptr_Function_13 Function %34 + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_ro %uint_0 + %23 = OpArrayLength %uint %sb_ro 0 + %24 = OpIMul %uint %23 %uint_4 + %26 = OpIMul %uint %uint_8 %uint_7 + %28 = OpIAdd %uint %uint_1 %26 + %29 = OpIAdd %uint %28 %uint_8 + %30 = OpULessThanEqual %bool %29 %24 + OpSelectionMerge %36 None + OpBranchConditional %30 %37 %36 + %37 = OpLabel + %41 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %43 = OpCooperativeMatrixLoadKHR %13 %41 %uint_1 %uint_8 NonPrivatePointer + OpStore %32 %43 None + OpBranch %36 + %36 = OpLabel + %38 = OpLoad %13 %32 None + OpStore %res %38 + %40 = OpLoad %13 %res None + OpReturnValue %40 + OpFunctionEnd +%compute_main = OpFunction %void None %46 + %47 = OpLabel + %48 = OpFunctionCall %13 %subgroupMatrixLoad_58b2f2 + %49 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %51 = OpAccessChain %_ptr_StorageBuffer_int_0 %49 %uint_0 + OpCooperativeMatrixStoreKHR %51 %48 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/5e2602.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/5e2602.wgsl.expected.spvasm index dc054b2..eb31bf4 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/5e2602.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/5e2602.wgsl.expected.spvasm
@@ -1,100 +1,97 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_5e2602() -> subgroup_matrix_result<u8, 8, 8> { - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_5e2602(), false, 64); -} - -Failed to generate SPIR-V: :27:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_5e2602 = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32>, read> = access %sb_ro, 0u - %5:u32 = spirv.array_length %sb_ro, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, u32, read> = access %4, 1u - %13:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_result<u8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_result<u8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_5e2602 - %19:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, u32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 55 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_5e2602 "subgroupMatrixLoad_5e2602" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %uint_1 = OpConstant %uint 1 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %34 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %46 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_5e2602 = OpFunction %12 None %17 + %18 = OpLabel + %32 = OpVariable %_ptr_Function_12 Function %34 + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_ro %uint_0 + %22 = OpArrayLength %uint %sb_ro 0 + %23 = OpIMul %uint %22 %uint_4 + %25 = OpIMul %uint %uint_8 %uint_7 + %27 = OpIAdd %uint %uint_1 %25 + %29 = OpIAdd %uint %27 %uint_8 + %30 = OpULessThanEqual %bool %29 %23 + OpSelectionMerge %36 None + OpBranchConditional %30 %37 %36 + %37 = OpLabel + %41 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %43 = OpCooperativeMatrixLoadKHR %12 %41 %uint_1 %uint_8 NonPrivatePointer + OpStore %32 %43 None + OpBranch %36 + %36 = OpLabel + %38 = OpLoad %12 %32 None + OpStore %res %38 + %40 = OpLoad %12 %res None + OpReturnValue %40 + OpFunctionEnd +%compute_main = OpFunction %void None %46 + %47 = OpLabel + %48 = OpFunctionCall %12 %subgroupMatrixLoad_5e2602 + %49 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %51 = OpAccessChain %_ptr_StorageBuffer_uint_0 %49 %uint_0 + OpCooperativeMatrixStoreKHR %51 %48 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/662272.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/662272.wgsl.expected.spvasm index f8203a7..cfde270 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/662272.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/662272.wgsl.expected.spvasm
@@ -1,98 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -var<workgroup> arg_0 : array<i32, 1024>; - -fn subgroupMatrixLoad_662272() -> subgroup_matrix_result<i8, 8, 8> { - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_662272(), false, 64); -} - -Failed to generate SPIR-V: :13:43 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<workgroup, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %5:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %4, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:11:3 note: in block - $B2: { - ^^^ - -:45:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:20:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %arg_0:ptr<workgroup, array<i32, 1024>, read_write> = var undef -} - -%subgroupMatrixLoad_662272 = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %4:ptr<workgroup, i32, read_write> = access %arg_0, 1u - %5:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %4, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %5 - %7:subgroup_matrix_result<i8, 8, 8> = load %res - ret %7 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func(%tint_local_index:u32 [@local_invocation_index]):void { - $B3: { - loop [i: $B4, b: $B5, c: $B6] { # loop_1 - $B4: { # initializer - next_iteration %tint_local_index # -> $B5 - } - $B5 (%idx:u32): { # body - %11:bool = gte %idx, 1024u - if %11 [t: $B7] { # if_1 - $B7: { # true - exit_loop # loop_1 - } - } - %12:ptr<workgroup, i32, read_write> = access %arg_0, %idx - store %12, 0i - continue # -> $B6 - } - $B6: { # continuing - %13:u32 = add %idx, 1u - next_iteration %13 # -> $B5 - } - } - %14:void = workgroupBarrier - %15:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_662272 - %16:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %17:ptr<storage, i32, read_write> = access %16, 0u - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpName %arg_0 "arg_0" + OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input" + OpName %subgroupMatrixLoad_662272 "subgroupMatrixLoad_662272" + OpName %res "res" + OpName %compute_main_inner "compute_main_inner" + OpName %tint_local_index "tint_local_index" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_arr_int_uint_1024_0 = OpTypeArray %int %uint_1024 +%_ptr_Workgroup__arr_int_uint_1024_0 = OpTypePointer Workgroup %_arr_int_uint_1024_0 + %arg_0 = OpVariable %_ptr_Workgroup__arr_int_uint_1024_0 Workgroup +%_ptr_Input_uint = OpTypePointer Input %uint +%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %14 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %19 = OpTypeFunction %14 +%_ptr_Workgroup_int = OpTypePointer Workgroup %int + %uint_1 = OpConstant %uint 1 +%_ptr_Function_14 = OpTypePointer Function %14 + %void = OpTypeVoid + %31 = OpTypeFunction %void %uint + %uint_24840 = OpConstant %uint 24840 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 + %bool = OpTypeBool + %int_0 = OpConstant %int 0 + %57 = OpTypeFunction %void +%subgroupMatrixLoad_662272 = OpFunction %14 None %19 + %20 = OpLabel + %res = OpVariable %_ptr_Function_14 Function + %21 = OpAccessChain %_ptr_Workgroup_int %arg_0 %uint_1 + %24 = OpCooperativeMatrixLoadKHR %14 %21 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %24 + %27 = OpLoad %14 %res None + OpReturnValue %27 + OpFunctionEnd +%compute_main_inner = OpFunction %void None %31 +%tint_local_index = OpFunctionParameter %uint + %32 = OpLabel + OpBranch %33 + %33 = OpLabel + OpBranch %36 + %36 = OpLabel + %38 = OpPhi %uint %tint_local_index %33 %39 %35 + OpLoopMerge %37 %35 None + OpBranch %34 + %34 = OpLabel + %50 = OpUGreaterThanEqual %bool %38 %uint_1024 + OpSelectionMerge %52 None + OpBranchConditional %50 %53 %52 + %53 = OpLabel + OpBranch %37 + %52 = OpLabel + %54 = OpAccessChain %_ptr_Workgroup_int %arg_0 %38 + OpStore %54 %int_0 NonPrivatePointer + OpBranch %35 + %35 = OpLabel + %39 = OpIAdd %uint %38 %uint_1 + OpBranch %36 + %37 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_24840 + %42 = OpFunctionCall %14 %subgroupMatrixLoad_662272 + %43 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %46 = OpAccessChain %_ptr_StorageBuffer_int %43 %uint_0 + OpCooperativeMatrixStoreKHR %46 %42 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %57 + %58 = OpLabel + %59 = OpLoad %uint %compute_main_local_invocation_index_Input None + %60 = OpFunctionCall %void %compute_main_inner %59 + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/664e6e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/664e6e.wgsl.expected.spvasm index 3ac3582..a31ed75 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/664e6e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/664e6e.wgsl.expected.spvasm
@@ -1,100 +1,95 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_664e6e() -> subgroup_matrix_right<i8, 8, 8> { - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_664e6e(), false, 64); -} - -Failed to generate SPIR-V: :27:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_664e6e = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32>, read_write> = access %sb_rw, 0u - %5:u32 = spirv.array_length %sb_rw, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, i32, read_write> = access %4, 1u - %13:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_right<i8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_right<i8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_664e6e - %19:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, i32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 54 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_664e6e "subgroupMatrixLoad_664e6e" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %34 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %46 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_664e6e = OpFunction %13 None %18 + %19 = OpLabel + %32 = OpVariable %_ptr_Function_13 Function %34 + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_rw %uint_0 + %23 = OpArrayLength %uint %sb_rw 0 + %24 = OpIMul %uint %23 %uint_4 + %26 = OpIMul %uint %uint_8 %uint_7 + %28 = OpIAdd %uint %uint_1 %26 + %29 = OpIAdd %uint %28 %uint_8 + %30 = OpULessThanEqual %bool %29 %24 + OpSelectionMerge %36 None + OpBranchConditional %30 %37 %36 + %37 = OpLabel + %41 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %43 = OpCooperativeMatrixLoadKHR %13 %41 %uint_1 %uint_8 NonPrivatePointer + OpStore %32 %43 None + OpBranch %36 + %36 = OpLabel + %38 = OpLoad %13 %32 None + OpStore %res %38 + %40 = OpLoad %13 %res None + OpReturnValue %40 + OpFunctionEnd +%compute_main = OpFunction %void None %46 + %47 = OpLabel + %48 = OpFunctionCall %13 %subgroupMatrixLoad_664e6e + %49 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %51 = OpAccessChain %_ptr_StorageBuffer_int %49 %uint_0 + OpCooperativeMatrixStoreKHR %51 %48 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/6778bb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/6778bb.wgsl.expected.spvasm index 3ae4a3c..2e4a08a 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/6778bb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/6778bb.wgsl.expected.spvasm
@@ -1,90 +1,79 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_6778bb() -> subgroup_matrix_left<i8, 8, 8> { - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_6778bb(), false, 64); -} - -Failed to generate SPIR-V: :22:41 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_6778bb = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32, 1024>, read> = access %2, 0u, 0u - %5:ptr<storage, i32, read> = access %4, 1u - %6:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_left<i8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_6778bb - %11:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, i32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 40 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_6778bb "subgroupMatrixLoad_6778bb" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + OpDecorate %8 NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %uint_1 = OpConstant %uint 1 +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %31 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024_0 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_6778bb = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %22 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %25 = OpCooperativeMatrixLoadKHR %13 %22 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %25 + %28 = OpLoad %13 %res None + OpReturnValue %28 + OpFunctionEnd +%compute_main = OpFunction %void None %31 + %32 = OpLabel + %33 = OpFunctionCall %13 %subgroupMatrixLoad_6778bb + %34 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024_0 %1 %uint_0 + %36 = OpAccessChain %_ptr_StorageBuffer_int_0 %34 %uint_0 + OpCooperativeMatrixStoreKHR %36 %33 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/86df2e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/86df2e.wgsl.expected.spvasm index ea71039..abac4f9 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/86df2e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/86df2e.wgsl.expected.spvasm
@@ -1,90 +1,75 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_86df2e() -> subgroup_matrix_right<u8, 8, 8> { - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_86df2e(), false, 64); -} - -Failed to generate SPIR-V: :22:42 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_86df2e = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32, 1024>, read_write> = access %2, 0u, 0u - %5:ptr<storage, u32, read_write> = access %4, 1u - %6:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_right<u8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_86df2e - %11:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, u32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 37 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_86df2e "subgroupMatrixLoad_86df2e" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint +%_ptr_Function_12 = OpTypePointer Function %12 + %void = OpTypeVoid + %30 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_86df2e = OpFunction %12 None %17 + %18 = OpLabel + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %22 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %24 = OpCooperativeMatrixLoadKHR %12 %22 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %24 + %27 = OpLoad %12 %res None + OpReturnValue %27 + OpFunctionEnd +%compute_main = OpFunction %void None %30 + %31 = OpLabel + %32 = OpFunctionCall %12 %subgroupMatrixLoad_86df2e + %33 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %34 = OpAccessChain %_ptr_StorageBuffer_uint %33 %uint_0 + OpCooperativeMatrixStoreKHR %34 %32 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/8861f0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/8861f0.wgsl.expected.spvasm index ebef1e8..b4e82df 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/8861f0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/8861f0.wgsl.expected.spvasm
@@ -1,90 +1,76 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_8861f0() -> subgroup_matrix_right<i8, 8, 8> { - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_8861f0(), false, 64); -} - -Failed to generate SPIR-V: :22:42 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_8861f0 = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32, 1024>, read_write> = access %2, 0u, 0u - %5:ptr<storage, i32, read_write> = access %4, 1u - %6:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_right<i8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_8861f0 - %11:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, i32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 38 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_8861f0 "subgroupMatrixLoad_8861f0" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %31 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_8861f0 = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %23 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %25 = OpCooperativeMatrixLoadKHR %13 %23 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %25 + %28 = OpLoad %13 %res None + OpReturnValue %28 + OpFunctionEnd +%compute_main = OpFunction %void None %31 + %32 = OpLabel + %33 = OpFunctionCall %13 %subgroupMatrixLoad_8861f0 + %34 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %35 = OpAccessChain %_ptr_StorageBuffer_int %34 %uint_0 + OpCooperativeMatrixStoreKHR %35 %33 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/91abc9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/91abc9.wgsl.expected.spvasm index ffdf136..4329164 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/91abc9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/91abc9.wgsl.expected.spvasm
@@ -1,100 +1,97 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_91abc9() -> subgroup_matrix_left<i8, 8, 8> { - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_91abc9(), false, 64); -} - -Failed to generate SPIR-V: :27:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_91abc9 = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32>, read> = access %sb_ro, 0u - %5:u32 = spirv.array_length %sb_ro, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, i32, read> = access %4, 1u - %13:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_left<i8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_left<i8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_91abc9 - %19:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, i32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 55 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_91abc9 "subgroupMatrixLoad_91abc9" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %uint_1 = OpConstant %uint 1 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %34 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %46 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_91abc9 = OpFunction %13 None %18 + %19 = OpLabel + %32 = OpVariable %_ptr_Function_13 Function %34 + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_ro %uint_0 + %22 = OpArrayLength %uint %sb_ro 0 + %23 = OpIMul %uint %22 %uint_4 + %25 = OpIMul %uint %uint_8 %uint_7 + %27 = OpIAdd %uint %uint_1 %25 + %29 = OpIAdd %uint %27 %uint_8 + %30 = OpULessThanEqual %bool %29 %23 + OpSelectionMerge %36 None + OpBranchConditional %30 %37 %36 + %37 = OpLabel + %41 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %43 = OpCooperativeMatrixLoadKHR %13 %41 %uint_1 %uint_8 NonPrivatePointer + OpStore %32 %43 None + OpBranch %36 + %36 = OpLabel + %38 = OpLoad %13 %32 None + OpStore %res %38 + %40 = OpLoad %13 %res None + OpReturnValue %40 + OpFunctionEnd +%compute_main = OpFunction %void None %46 + %47 = OpLabel + %48 = OpFunctionCall %13 %subgroupMatrixLoad_91abc9 + %49 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %51 = OpAccessChain %_ptr_StorageBuffer_int_0 %49 %uint_0 + OpCooperativeMatrixStoreKHR %51 %48 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/9bc799.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/9bc799.wgsl.expected.spvasm index 784d6ca..9a666e6 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/9bc799.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/9bc799.wgsl.expected.spvasm
@@ -1,90 +1,80 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_9bc799() -> subgroup_matrix_result<i8, 8, 8> { - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_9bc799(), false, 64); -} - -Failed to generate SPIR-V: :22:43 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_9bc799 = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32, 1024>, read> = access %2, 0u, 0u - %5:ptr<storage, i32, read> = access %4, 1u - %6:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_result<i8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_9bc799 - %11:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, i32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 41 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_9bc799 "subgroupMatrixLoad_9bc799" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + OpDecorate %8 NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %uint_1 = OpConstant %uint 1 +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %32 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024_0 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_9bc799 = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %23 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %26 = OpCooperativeMatrixLoadKHR %13 %23 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %26 + %29 = OpLoad %13 %res None + OpReturnValue %29 + OpFunctionEnd +%compute_main = OpFunction %void None %32 + %33 = OpLabel + %34 = OpFunctionCall %13 %subgroupMatrixLoad_9bc799 + %35 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024_0 %1 %uint_0 + %37 = OpAccessChain %_ptr_StorageBuffer_int_0 %35 %uint_0 + OpCooperativeMatrixStoreKHR %37 %34 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/9c4b12.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/9c4b12.wgsl.expected.spvasm index 0534ac9..12940a6 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/9c4b12.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/9c4b12.wgsl.expected.spvasm
@@ -1,90 +1,75 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_9c4b12() -> subgroup_matrix_left<u8, 8, 8> { - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_9c4b12(), false, 64); -} - -Failed to generate SPIR-V: :22:41 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_9c4b12 = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32, 1024>, read_write> = access %2, 0u, 0u - %5:ptr<storage, u32, read_write> = access %4, 1u - %6:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_left<u8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_9c4b12 - %11:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, u32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 37 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_9c4b12 "subgroupMatrixLoad_9c4b12" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %uint_1 = OpConstant %uint 1 +%_ptr_Function_12 = OpTypePointer Function %12 + %void = OpTypeVoid + %30 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_9c4b12 = OpFunction %12 None %17 + %18 = OpLabel + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %21 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %24 = OpCooperativeMatrixLoadKHR %12 %21 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %24 + %27 = OpLoad %12 %res None + OpReturnValue %27 + OpFunctionEnd +%compute_main = OpFunction %void None %30 + %31 = OpLabel + %32 = OpFunctionCall %12 %subgroupMatrixLoad_9c4b12 + %33 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %34 = OpAccessChain %_ptr_StorageBuffer_uint %33 %uint_0 + OpCooperativeMatrixStoreKHR %34 %32 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/ad687c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/ad687c.wgsl.expected.spvasm index 18f6c0d..3fb5b15 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/ad687c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/ad687c.wgsl.expected.spvasm
@@ -1,90 +1,78 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_ad687c() -> subgroup_matrix_left<u8, 8, 8> { - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_ad687c(), false, 64); -} - -Failed to generate SPIR-V: :22:41 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_ad687c = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32, 1024>, read> = access %2, 0u, 0u - %5:ptr<storage, u32, read> = access %4, 1u - %6:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_left<u8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_ad687c - %11:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, u32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 39 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_ad687c "subgroupMatrixLoad_ad687c" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + OpDecorate %7 NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %uint_1 = OpConstant %uint 1 +%_ptr_Function_12 = OpTypePointer Function %12 + %void = OpTypeVoid + %30 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024_0 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_ad687c = OpFunction %12 None %17 + %18 = OpLabel + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %21 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %24 = OpCooperativeMatrixLoadKHR %12 %21 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %24 + %27 = OpLoad %12 %res None + OpReturnValue %27 + OpFunctionEnd +%compute_main = OpFunction %void None %30 + %31 = OpLabel + %32 = OpFunctionCall %12 %subgroupMatrixLoad_ad687c + %33 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024_0 %1 %uint_0 + %35 = OpAccessChain %_ptr_StorageBuffer_uint_0 %33 %uint_0 + OpCooperativeMatrixStoreKHR %35 %32 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/b19701.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/b19701.wgsl.expected.spvasm index 78c13fe..bb5afd4 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/b19701.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/b19701.wgsl.expected.spvasm
@@ -1,90 +1,79 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_b19701() -> subgroup_matrix_right<i8, 8, 8> { - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_b19701(), false, 64); -} - -Failed to generate SPIR-V: :22:42 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_b19701 = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32, 1024>, read> = access %2, 0u, 0u - %5:ptr<storage, i32, read> = access %4, 1u - %6:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_right<i8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_b19701 - %11:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, i32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 40 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_b19701 "subgroupMatrixLoad_b19701" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + OpDecorate %8 NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %31 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024_0 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_b19701 = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %23 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %25 = OpCooperativeMatrixLoadKHR %13 %23 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %25 + %28 = OpLoad %13 %res None + OpReturnValue %28 + OpFunctionEnd +%compute_main = OpFunction %void None %31 + %32 = OpLabel + %33 = OpFunctionCall %13 %subgroupMatrixLoad_b19701 + %34 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024_0 %1 %uint_0 + %36 = OpAccessChain %_ptr_StorageBuffer_int_0 %34 %uint_0 + OpCooperativeMatrixStoreKHR %36 %33 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/b6f72c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/b6f72c.wgsl.expected.spvasm index bc1b820..d819fcf 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/b6f72c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/b6f72c.wgsl.expected.spvasm
@@ -1,98 +1,105 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -var<workgroup> arg_0 : array<u32, 1024>; - -fn subgroupMatrixLoad_b6f72c() -> subgroup_matrix_result<u8, 8, 8> { - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_b6f72c(), false, 64); -} - -Failed to generate SPIR-V: :13:43 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<workgroup, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %5:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %4, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:11:3 note: in block - $B2: { - ^^^ - -:45:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:20:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %arg_0:ptr<workgroup, array<u32, 1024>, read_write> = var undef -} - -%subgroupMatrixLoad_b6f72c = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %4:ptr<workgroup, u32, read_write> = access %arg_0, 1u - %5:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %4, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %5 - %7:subgroup_matrix_result<u8, 8, 8> = load %res - ret %7 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func(%tint_local_index:u32 [@local_invocation_index]):void { - $B3: { - loop [i: $B4, b: $B5, c: $B6] { # loop_1 - $B4: { # initializer - next_iteration %tint_local_index # -> $B5 - } - $B5 (%idx:u32): { # body - %11:bool = gte %idx, 1024u - if %11 [t: $B7] { # if_1 - $B7: { # true - exit_loop # loop_1 - } - } - %12:ptr<workgroup, u32, read_write> = access %arg_0, %idx - store %12, 0u - continue # -> $B6 - } - $B6: { # continuing - %13:u32 = add %idx, 1u - next_iteration %13 # -> $B5 - } - } - %14:void = workgroupBarrier - %15:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_b6f72c - %16:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %17:ptr<storage, u32, read_write> = access %16, 0u - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 59 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpName %arg_0 "arg_0" + OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input" + OpName %subgroupMatrixLoad_b6f72c "subgroupMatrixLoad_b6f72c" + OpName %res "res" + OpName %compute_main_inner "compute_main_inner" + OpName %tint_local_index "tint_local_index" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_arr_uint_uint_1024_0 = OpTypeArray %uint %uint_1024 +%_ptr_Workgroup__arr_uint_uint_1024_0 = OpTypePointer Workgroup %_arr_uint_uint_1024_0 + %arg_0 = OpVariable %_ptr_Workgroup__arr_uint_uint_1024_0 Workgroup +%_ptr_Input_uint = OpTypePointer Input %uint +%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint + %uint_1 = OpConstant %uint 1 +%_ptr_Function_13 = OpTypePointer Function %13 + %void = OpTypeVoid + %30 = OpTypeFunction %void %uint + %uint_24840 = OpConstant %uint 24840 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 + %bool = OpTypeBool + %55 = OpTypeFunction %void +%subgroupMatrixLoad_b6f72c = OpFunction %13 None %18 + %19 = OpLabel + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_Workgroup_uint %arg_0 %uint_1 + %23 = OpCooperativeMatrixLoadKHR %13 %20 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %23 + %26 = OpLoad %13 %res None + OpReturnValue %26 + OpFunctionEnd +%compute_main_inner = OpFunction %void None %30 +%tint_local_index = OpFunctionParameter %uint + %31 = OpLabel + OpBranch %32 + %32 = OpLabel + OpBranch %35 + %35 = OpLabel + %37 = OpPhi %uint %tint_local_index %32 %38 %34 + OpLoopMerge %36 %34 None + OpBranch %33 + %33 = OpLabel + %49 = OpUGreaterThanEqual %bool %37 %uint_1024 + OpSelectionMerge %51 None + OpBranchConditional %49 %52 %51 + %52 = OpLabel + OpBranch %36 + %51 = OpLabel + %53 = OpAccessChain %_ptr_Workgroup_uint %arg_0 %37 + OpStore %53 %uint_0 NonPrivatePointer + OpBranch %34 + %34 = OpLabel + %38 = OpIAdd %uint %37 %uint_1 + OpBranch %35 + %36 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_24840 + %41 = OpFunctionCall %13 %subgroupMatrixLoad_b6f72c + %42 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %45 = OpAccessChain %_ptr_StorageBuffer_uint %42 %uint_0 + OpCooperativeMatrixStoreKHR %45 %41 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %55 + %56 = OpLabel + %57 = OpLoad %uint %compute_main_local_invocation_index_Input None + %58 = OpFunctionCall %void %compute_main_inner %57 + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/bcfcb6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/bcfcb6.wgsl.expected.spvasm index 0d7c575..4eecac0 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/bcfcb6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/bcfcb6.wgsl.expected.spvasm
@@ -1,100 +1,96 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_bcfcb6() -> subgroup_matrix_left<u8, 8, 8> { - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_bcfcb6(), false, 64); -} - -Failed to generate SPIR-V: :27:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_bcfcb6 = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32>, read> = access %sb_ro, 0u - %5:u32 = spirv.array_length %sb_ro, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, u32, read> = access %4, 1u - %13:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_left<u8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_left<u8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_bcfcb6 - %19:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, u32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 54 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_bcfcb6 "subgroupMatrixLoad_bcfcb6" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %uint_1 = OpConstant %uint 1 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %33 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %45 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_bcfcb6 = OpFunction %12 None %17 + %18 = OpLabel + %31 = OpVariable %_ptr_Function_12 Function %33 + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_ro %uint_0 + %21 = OpArrayLength %uint %sb_ro 0 + %22 = OpIMul %uint %21 %uint_4 + %24 = OpIMul %uint %uint_8 %uint_7 + %26 = OpIAdd %uint %uint_1 %24 + %28 = OpIAdd %uint %26 %uint_8 + %29 = OpULessThanEqual %bool %28 %22 + OpSelectionMerge %35 None + OpBranchConditional %29 %36 %35 + %36 = OpLabel + %40 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %42 = OpCooperativeMatrixLoadKHR %12 %40 %uint_1 %uint_8 NonPrivatePointer + OpStore %31 %42 None + OpBranch %35 + %35 = OpLabel + %37 = OpLoad %12 %31 None + OpStore %res %37 + %39 = OpLoad %12 %res None + OpReturnValue %39 + OpFunctionEnd +%compute_main = OpFunction %void None %45 + %46 = OpLabel + %47 = OpFunctionCall %12 %subgroupMatrixLoad_bcfcb6 + %48 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %50 = OpAccessChain %_ptr_StorageBuffer_uint_0 %48 %uint_0 + OpCooperativeMatrixStoreKHR %50 %47 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/d72b92.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/d72b92.wgsl.expected.spvasm index 0b458df..9bd5604 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/d72b92.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/d72b92.wgsl.expected.spvasm
@@ -1,90 +1,78 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_d72b92() -> subgroup_matrix_right<u8, 8, 8> { - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_d72b92(), false, 64); -} - -Failed to generate SPIR-V: :22:42 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_d72b92 = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32, 1024>, read> = access %2, 0u, 0u - %5:ptr<storage, u32, read> = access %4, 1u - %6:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_right<u8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_d72b92 - %11:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, u32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 39 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_d72b92 "subgroupMatrixLoad_d72b92" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + OpDecorate %7 NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint +%_ptr_Function_12 = OpTypePointer Function %12 + %void = OpTypeVoid + %30 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024_0 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_d72b92 = OpFunction %12 None %17 + %18 = OpLabel + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %22 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %24 = OpCooperativeMatrixLoadKHR %12 %22 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %24 + %27 = OpLoad %12 %res None + OpReturnValue %27 + OpFunctionEnd +%compute_main = OpFunction %void None %30 + %31 = OpLabel + %32 = OpFunctionCall %12 %subgroupMatrixLoad_d72b92 + %33 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024_0 %1 %uint_0 + %35 = OpAccessChain %_ptr_StorageBuffer_uint_0 %33 %uint_0 + OpCooperativeMatrixStoreKHR %35 %32 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/df0754.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/df0754.wgsl.expected.spvasm index 2c25e6f..b9aefd9 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/df0754.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/df0754.wgsl.expected.spvasm
@@ -1,98 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -var<workgroup> arg_0 : array<i32, 1024>; - -fn subgroupMatrixLoad_df0754() -> subgroup_matrix_left<i8, 8, 8> { - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_df0754(), false, 64); -} - -Failed to generate SPIR-V: :13:41 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<workgroup, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %5:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %4, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:11:3 note: in block - $B2: { - ^^^ - -:45:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:20:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %arg_0:ptr<workgroup, array<i32, 1024>, read_write> = var undef -} - -%subgroupMatrixLoad_df0754 = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %4:ptr<workgroup, i32, read_write> = access %arg_0, 1u - %5:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %4, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %5 - %7:subgroup_matrix_left<i8, 8, 8> = load %res - ret %7 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func(%tint_local_index:u32 [@local_invocation_index]):void { - $B3: { - loop [i: $B4, b: $B5, c: $B6] { # loop_1 - $B4: { # initializer - next_iteration %tint_local_index # -> $B5 - } - $B5 (%idx:u32): { # body - %11:bool = gte %idx, 1024u - if %11 [t: $B7] { # if_1 - $B7: { # true - exit_loop # loop_1 - } - } - %12:ptr<workgroup, i32, read_write> = access %arg_0, %idx - store %12, 0i - continue # -> $B6 - } - $B6: { # continuing - %13:u32 = add %idx, 1u - next_iteration %13 # -> $B5 - } - } - %14:void = workgroupBarrier - %15:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_df0754 - %16:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %17:ptr<storage, i32, read_write> = access %16, 0u - %18:void = spirv.cooperative_matrix_store %17, %15, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" %compute_main_local_invocation_index_Input + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpName %arg_0 "arg_0" + OpName %compute_main_local_invocation_index_Input "compute_main_local_invocation_index_Input" + OpName %subgroupMatrixLoad_df0754 "subgroupMatrixLoad_df0754" + OpName %res "res" + OpName %compute_main_inner "compute_main_inner" + OpName %tint_local_index "tint_local_index" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %compute_main_local_invocation_index_Input BuiltIn LocalInvocationIndex + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_arr_int_uint_1024_0 = OpTypeArray %int %uint_1024 +%_ptr_Workgroup__arr_int_uint_1024_0 = OpTypePointer Workgroup %_arr_int_uint_1024_0 + %arg_0 = OpVariable %_ptr_Workgroup__arr_int_uint_1024_0 Workgroup +%_ptr_Input_uint = OpTypePointer Input %uint +%compute_main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %14 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %19 = OpTypeFunction %14 +%_ptr_Workgroup_int = OpTypePointer Workgroup %int + %uint_1 = OpConstant %uint 1 +%_ptr_Function_14 = OpTypePointer Function %14 + %void = OpTypeVoid + %31 = OpTypeFunction %void %uint + %uint_2 = OpConstant %uint 2 + %uint_24840 = OpConstant %uint 24840 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 + %bool = OpTypeBool + %int_0 = OpConstant %int 0 + %57 = OpTypeFunction %void +%subgroupMatrixLoad_df0754 = OpFunction %14 None %19 + %20 = OpLabel + %res = OpVariable %_ptr_Function_14 Function + %21 = OpAccessChain %_ptr_Workgroup_int %arg_0 %uint_1 + %24 = OpCooperativeMatrixLoadKHR %14 %21 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %24 + %27 = OpLoad %14 %res None + OpReturnValue %27 + OpFunctionEnd +%compute_main_inner = OpFunction %void None %31 +%tint_local_index = OpFunctionParameter %uint + %32 = OpLabel + OpBranch %33 + %33 = OpLabel + OpBranch %36 + %36 = OpLabel + %38 = OpPhi %uint %tint_local_index %33 %39 %35 + OpLoopMerge %37 %35 None + OpBranch %34 + %34 = OpLabel + %50 = OpUGreaterThanEqual %bool %38 %uint_1024 + OpSelectionMerge %52 None + OpBranchConditional %50 %53 %52 + %53 = OpLabel + OpBranch %37 + %52 = OpLabel + %54 = OpAccessChain %_ptr_Workgroup_int %arg_0 %38 + OpStore %54 %int_0 NonPrivatePointer + OpBranch %35 + %35 = OpLabel + %39 = OpIAdd %uint %38 %uint_1 + OpBranch %36 + %37 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_24840 + %43 = OpFunctionCall %14 %subgroupMatrixLoad_df0754 + %44 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %46 = OpAccessChain %_ptr_StorageBuffer_int %44 %uint_0 + OpCooperativeMatrixStoreKHR %46 %43 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd +%compute_main = OpFunction %void None %57 + %58 = OpLabel + %59 = OpLoad %uint %compute_main_local_invocation_index_Input None + %60 = OpFunctionCall %void %compute_main_inner %59 + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/e40231.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/e40231.wgsl.expected.spvasm index cf5ea7e..f6c8218 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/e40231.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/e40231.wgsl.expected.spvasm
@@ -1,100 +1,96 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_e40231() -> subgroup_matrix_result<i8, 8, 8> { - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_e40231(), false, 64); -} - -Failed to generate SPIR-V: :27:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_e40231 = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %4:ptr<storage, array<i32>, read_write> = access %sb_rw, 0u - %5:u32 = spirv.array_length %sb_rw, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, i32, read_write> = access %4, 1u - %13:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_result<i8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_result<i8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_e40231 - %19:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, i32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 55 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_e40231 "subgroupMatrixLoad_e40231" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %uint_1 = OpConstant %uint 1 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %35 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %47 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_e40231 = OpFunction %13 None %18 + %19 = OpLabel + %33 = OpVariable %_ptr_Function_13 Function %35 + %res = OpVariable %_ptr_Function_13 Function + %20 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_rw %uint_0 + %23 = OpArrayLength %uint %sb_rw 0 + %24 = OpIMul %uint %23 %uint_4 + %26 = OpIMul %uint %uint_8 %uint_7 + %28 = OpIAdd %uint %uint_1 %26 + %30 = OpIAdd %uint %28 %uint_8 + %31 = OpULessThanEqual %bool %30 %24 + OpSelectionMerge %37 None + OpBranchConditional %31 %38 %37 + %38 = OpLabel + %42 = OpAccessChain %_ptr_StorageBuffer_int %20 %uint_1 + %44 = OpCooperativeMatrixLoadKHR %13 %42 %uint_1 %uint_8 NonPrivatePointer + OpStore %33 %44 None + OpBranch %37 + %37 = OpLabel + %39 = OpLoad %13 %33 None + OpStore %res %39 + %41 = OpLoad %13 %res None + OpReturnValue %41 + OpFunctionEnd +%compute_main = OpFunction %void None %47 + %48 = OpLabel + %49 = OpFunctionCall %13 %subgroupMatrixLoad_e40231 + %50 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %52 = OpAccessChain %_ptr_StorageBuffer_int %50 %uint_0 + OpCooperativeMatrixStoreKHR %52 %49 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/e5381c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/e5381c.wgsl.expected.spvasm index 5e08f62..a39e211 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/e5381c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/e5381c.wgsl.expected.spvasm
@@ -1,100 +1,95 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_e5381c() -> subgroup_matrix_result<u8, 8, 8> { - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_e5381c(), false, 64); -} - -Failed to generate SPIR-V: :27:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_e5381c = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32>, read_write> = access %sb_rw, 0u - %5:u32 = spirv.array_length %sb_rw, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, u32, read_write> = access %4, 1u - %13:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_result<u8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_result<u8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_e5381c - %19:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, u32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 54 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_e5381c "subgroupMatrixLoad_e5381c" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %uint_1 = OpConstant %uint 1 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %34 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %46 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_e5381c = OpFunction %12 None %17 + %18 = OpLabel + %32 = OpVariable %_ptr_Function_12 Function %34 + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_rw %uint_0 + %22 = OpArrayLength %uint %sb_rw 0 + %23 = OpIMul %uint %22 %uint_4 + %25 = OpIMul %uint %uint_8 %uint_7 + %27 = OpIAdd %uint %uint_1 %25 + %29 = OpIAdd %uint %27 %uint_8 + %30 = OpULessThanEqual %bool %29 %23 + OpSelectionMerge %36 None + OpBranchConditional %30 %37 %36 + %37 = OpLabel + %41 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %43 = OpCooperativeMatrixLoadKHR %12 %41 %uint_1 %uint_8 NonPrivatePointer + OpStore %32 %43 None + OpBranch %36 + %36 = OpLabel + %38 = OpLoad %12 %32 None + OpStore %res %38 + %40 = OpLoad %12 %res None + OpReturnValue %40 + OpFunctionEnd +%compute_main = OpFunction %void None %46 + %47 = OpLabel + %48 = OpFunctionCall %12 %subgroupMatrixLoad_e5381c + %49 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %51 = OpAccessChain %_ptr_StorageBuffer_uint %49 %uint_0 + OpCooperativeMatrixStoreKHR %51 %48 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/f364a9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/f364a9.wgsl.expected.spvasm index dc40b3d..4147c1b 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/f364a9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/f364a9.wgsl.expected.spvasm
@@ -1,100 +1,94 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_f364a9() -> subgroup_matrix_right<u8, 8, 8> { - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(sb_rw.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_f364a9(), false, 64); -} - -Failed to generate SPIR-V: :27:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %12, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:25:7 note: in block - $B3: { # true - ^^^ - -:43:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:39:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_f364a9 = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32>, read_write> = access %sb_rw, 0u - %5:u32 = spirv.array_length %sb_rw, 0u - %6:u32 = mul %5, 4u - %7:u32 = mul 8u, 7u - %8:u32 = add 1u, %7 - %9:u32 = add %8, 8u - %10:bool = lte %9, %6 - %11:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var undef - if %10 [t: $B3] { # if_1 - $B3: { # true - %12:ptr<storage, u32, read_write> = access %4, 1u - %13:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %12, 1u, 8u, 32u - store %11, %13 - exit_if # if_1 - } - } - %14:subgroup_matrix_right<u8, 8, 8> = load %11 - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %14 - %16:subgroup_matrix_right<u8, 8, 8> = load %res - ret %16 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %18:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_f364a9 - %19:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %20:ptr<storage, u32, read_write> = access %19, 0u - %21:void = spirv.cooperative_matrix_store %20, %18, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 53 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_f364a9 "subgroupMatrixLoad_f364a9" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %33 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %45 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_f364a9 = OpFunction %12 None %17 + %18 = OpLabel + %31 = OpVariable %_ptr_Function_12 Function %33 + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_rw %uint_0 + %22 = OpArrayLength %uint %sb_rw 0 + %23 = OpIMul %uint %22 %uint_4 + %25 = OpIMul %uint %uint_8 %uint_7 + %27 = OpIAdd %uint %uint_1 %25 + %28 = OpIAdd %uint %27 %uint_8 + %29 = OpULessThanEqual %bool %28 %23 + OpSelectionMerge %35 None + OpBranchConditional %29 %36 %35 + %36 = OpLabel + %40 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %42 = OpCooperativeMatrixLoadKHR %12 %40 %uint_1 %uint_8 NonPrivatePointer + OpStore %31 %42 None + OpBranch %35 + %35 = OpLabel + %37 = OpLoad %12 %31 None + OpStore %res %37 + %39 = OpLoad %12 %res None + OpReturnValue %39 + OpFunctionEnd +%compute_main = OpFunction %void None %45 + %46 = OpLabel + %47 = OpFunctionCall %12 %subgroupMatrixLoad_f364a9 + %48 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %50 = OpAccessChain %_ptr_StorageBuffer_uint %48 %uint_0 + OpCooperativeMatrixStoreKHR %50 %47 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/subgroupMatrixLoad/f86f9f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/subgroupMatrixLoad/f86f9f.wgsl.expected.spvasm index 6a1a416..c660d69 100644 --- a/test/tint/builtins/gen/literal/subgroupMatrixLoad/f86f9f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/subgroupMatrixLoad/f86f9f.wgsl.expected.spvasm
@@ -1,90 +1,79 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_f86f9f() -> subgroup_matrix_result<u8, 8, 8> { - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(sb_ro.arg_0), 1u, true, 8u); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_f86f9f(), false, 64); -} - -Failed to generate SPIR-V: :22:43 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %6:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %5, 1u, 8u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:19:3 note: in block - $B2: { - ^^^ - -:33:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:29:3 note: in block - $B3: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_f86f9f = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %4:ptr<storage, array<u32, 1024>, read> = access %2, 0u, 0u - %5:ptr<storage, u32, read> = access %4, 1u - %6:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %5, 1u, 8u, 32u - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %6 - %8:subgroup_matrix_result<u8, 8, 8> = load %res - ret %8 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B3: { - %10:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_f86f9f - %11:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %12:ptr<storage, u32, read_write> = access %11, 0u - %13:void = spirv.cooperative_matrix_store %12, %10, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 40 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_f86f9f "subgroupMatrixLoad_f86f9f" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + OpDecorate %7 NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %17 = OpTypeFunction %12 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %uint_1 = OpConstant %uint 1 +%_ptr_Function_12 = OpTypePointer Function %12 + %void = OpTypeVoid + %31 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024_0 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_f86f9f = OpFunction %12 None %17 + %18 = OpLabel + %res = OpVariable %_ptr_Function_12 Function + %19 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %22 = OpAccessChain %_ptr_StorageBuffer_uint %19 %uint_1 + %25 = OpCooperativeMatrixLoadKHR %12 %22 %uint_1 %uint_8 NonPrivatePointer + OpStore %res %25 + %28 = OpLoad %12 %res None + OpReturnValue %28 + OpFunctionEnd +%compute_main = OpFunction %void None %31 + %32 = OpLabel + %33 = OpFunctionCall %12 %subgroupMatrixLoad_f86f9f + %34 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024_0 %1 %uint_0 + %36 = OpAccessChain %_ptr_StorageBuffer_uint_0 %34 %uint_0 + OpCooperativeMatrixStoreKHR %36 %33 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/03a4db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/03a4db.wgsl.expected.spvasm index feffd65..a41be20 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/03a4db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/03a4db.wgsl.expected.spvasm
@@ -1,108 +1,109 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_03a4db() -> subgroup_matrix_result<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_03a4db(), false, 64); -} - -Failed to generate SPIR-V: :32:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_03a4db = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32>, read> = access %sb_ro, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_ro, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, i32, read> = access %6, %7 - %18:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_result<i8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_result<i8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_03a4db - %24:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, i32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 63 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %30 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_03a4db "subgroupMatrixLoad_03a4db" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %42 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %54 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_03a4db = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %40 = OpVariable %_ptr_Function_13 Function %42 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %24 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_ro %uint_0 + %27 = OpLoad %uint %arg_1 None + %28 = OpLoad %uint %arg_3 None + %29 = OpExtInst %uint %30 UMax %28 %uint_8 + %31 = OpArrayLength %uint %sb_ro 0 + %32 = OpIMul %uint %31 %uint_4 + %34 = OpIMul %uint %29 %uint_7 + %36 = OpIAdd %uint %27 %34 + %37 = OpIAdd %uint %36 %uint_8 + %38 = OpULessThanEqual %bool %37 %32 + OpSelectionMerge %44 None + OpBranchConditional %38 %45 %44 + %45 = OpLabel + %49 = OpAccessChain %_ptr_StorageBuffer_int %24 %27 + %51 = OpCooperativeMatrixLoadKHR %13 %49 %uint_1 %29 NonPrivatePointer + OpStore %40 %51 None + OpBranch %44 + %44 = OpLabel + %46 = OpLoad %13 %40 None + OpStore %res %46 + %48 = OpLoad %13 %res None + OpReturnValue %48 + OpFunctionEnd +%compute_main = OpFunction %void None %54 + %55 = OpLabel + %56 = OpFunctionCall %13 %subgroupMatrixLoad_03a4db + %57 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %59 = OpAccessChain %_ptr_StorageBuffer_int_0 %57 %uint_0 + OpCooperativeMatrixStoreKHR %59 %56 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/0f7739.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/0f7739.wgsl.expected.spvasm index 89be14d..69e5474 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/0f7739.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/0f7739.wgsl.expected.spvasm
@@ -1,108 +1,106 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_0f7739() -> subgroup_matrix_left<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_0f7739(), false, 64); -} - -Failed to generate SPIR-V: :32:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_0f7739 = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32>, read_write> = access %sb_rw, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_rw, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, i32, read_write> = access %6, %7 - %18:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_left<i8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_left<i8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_0f7739 - %24:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, i32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_0f7739 "subgroupMatrixLoad_0f7739" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %41 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %53 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_0f7739 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %39 = OpVariable %_ptr_Function_13 Function %41 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %24 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_rw %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpArrayLength %uint %sb_rw 0 + %31 = OpIMul %uint %30 %uint_4 + %33 = OpIMul %uint %28 %uint_7 + %35 = OpIAdd %uint %26 %33 + %36 = OpIAdd %uint %35 %uint_8 + %37 = OpULessThanEqual %bool %36 %31 + OpSelectionMerge %43 None + OpBranchConditional %37 %44 %43 + %44 = OpLabel + %48 = OpAccessChain %_ptr_StorageBuffer_int %24 %26 + %50 = OpCooperativeMatrixLoadKHR %13 %48 %uint_1 %28 NonPrivatePointer + OpStore %39 %50 None + OpBranch %43 + %43 = OpLabel + %45 = OpLoad %13 %39 None + OpStore %res %45 + %47 = OpLoad %13 %res None + OpReturnValue %47 + OpFunctionEnd +%compute_main = OpFunction %void None %53 + %54 = OpLabel + %55 = OpFunctionCall %13 %subgroupMatrixLoad_0f7739 + %56 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %58 = OpAccessChain %_ptr_StorageBuffer_int %56 %uint_0 + OpCooperativeMatrixStoreKHR %58 %55 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/122298.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/122298.wgsl.expected.spvasm index 3b08541..593fe7f 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/122298.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/122298.wgsl.expected.spvasm
@@ -1,110 +1,104 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_122298() -> subgroup_matrix_left<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_122298(), false, 64); -} - -Failed to generate SPIR-V: :34:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_122298 = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32, 1024>, read_write> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, i32, read_write> = access %6, %7 - %16:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_left<i8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_left<i8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_122298 - %22:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, i32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 58 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_122298 "subgroupMatrixLoad_122298" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %39 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %51 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_122298 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %37 = OpVariable %_ptr_Function_13 Function %39 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %24 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpIMul %uint %28 %uint_7 + %32 = OpIAdd %uint %26 %30 + %33 = OpIAdd %uint %32 %uint_8 + %34 = OpULessThanEqual %bool %33 %uint_4096 + OpSelectionMerge %41 None + OpBranchConditional %34 %42 %41 + %42 = OpLabel + %46 = OpAccessChain %_ptr_StorageBuffer_int %24 %26 + %48 = OpCooperativeMatrixLoadKHR %13 %46 %uint_1 %28 NonPrivatePointer + OpStore %37 %48 None + OpBranch %41 + %41 = OpLabel + %43 = OpLoad %13 %37 None + OpStore %res %43 + %45 = OpLoad %13 %res None + OpReturnValue %45 + OpFunctionEnd +%compute_main = OpFunction %void None %51 + %52 = OpLabel + %53 = OpFunctionCall %13 %subgroupMatrixLoad_122298 + %54 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %55 = OpAccessChain %_ptr_StorageBuffer_int %54 %uint_0 + OpCooperativeMatrixStoreKHR %55 %53 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/297099.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/297099.wgsl.expected.spvasm index 0dbdffe..5706865 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/297099.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/297099.wgsl.expected.spvasm
@@ -1,110 +1,105 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_297099() -> subgroup_matrix_result<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_297099(), false, 64); -} - -Failed to generate SPIR-V: :34:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_297099 = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32, 1024>, read_write> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, i32, read_write> = access %6, %7 - %16:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_result<i8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_result<i8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_297099 - %22:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, i32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 59 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %30 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_297099 "subgroupMatrixLoad_297099" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %40 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %52 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_297099 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %38 = OpVariable %_ptr_Function_13 Function %40 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %24 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %27 = OpLoad %uint %arg_1 None + %28 = OpLoad %uint %arg_3 None + %29 = OpExtInst %uint %30 UMax %28 %uint_8 + %31 = OpIMul %uint %29 %uint_7 + %33 = OpIAdd %uint %27 %31 + %34 = OpIAdd %uint %33 %uint_8 + %35 = OpULessThanEqual %bool %34 %uint_4096 + OpSelectionMerge %42 None + OpBranchConditional %35 %43 %42 + %43 = OpLabel + %47 = OpAccessChain %_ptr_StorageBuffer_int %24 %27 + %49 = OpCooperativeMatrixLoadKHR %13 %47 %uint_1 %29 NonPrivatePointer + OpStore %38 %49 None + OpBranch %42 + %42 = OpLabel + %44 = OpLoad %13 %38 None + OpStore %res %44 + %46 = OpLoad %13 %res None + OpReturnValue %46 + OpFunctionEnd +%compute_main = OpFunction %void None %52 + %53 = OpLabel + %54 = OpFunctionCall %13 %subgroupMatrixLoad_297099 + %55 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %56 = OpAccessChain %_ptr_StorageBuffer_int %55 %uint_0 + OpCooperativeMatrixStoreKHR %56 %54 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/29f533.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/29f533.wgsl.expected.spvasm index 92f7a11..8a44ec7 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/29f533.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/29f533.wgsl.expected.spvasm
@@ -1,108 +1,105 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_29f533() -> subgroup_matrix_left<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_29f533(), false, 64); -} - -Failed to generate SPIR-V: :32:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_29f533 = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32>, read_write> = access %sb_rw, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_rw, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, u32, read_write> = access %6, %7 - %18:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_left<u8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_left<u8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_29f533 - %24:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, u32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 60 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %28 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_29f533 "subgroupMatrixLoad_29f533" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %40 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %52 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_29f533 = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %38 = OpVariable %_ptr_Function_12 Function %40 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_rw %uint_0 + %25 = OpLoad %uint %arg_1 None + %26 = OpLoad %uint %arg_3 None + %27 = OpExtInst %uint %28 UMax %26 %uint_8 + %29 = OpArrayLength %uint %sb_rw 0 + %30 = OpIMul %uint %29 %uint_4 + %32 = OpIMul %uint %27 %uint_7 + %34 = OpIAdd %uint %25 %32 + %35 = OpIAdd %uint %34 %uint_8 + %36 = OpULessThanEqual %bool %35 %30 + OpSelectionMerge %42 None + OpBranchConditional %36 %43 %42 + %43 = OpLabel + %47 = OpAccessChain %_ptr_StorageBuffer_uint %23 %25 + %49 = OpCooperativeMatrixLoadKHR %12 %47 %uint_1 %27 NonPrivatePointer + OpStore %38 %49 None + OpBranch %42 + %42 = OpLabel + %44 = OpLoad %12 %38 None + OpStore %res %44 + %46 = OpLoad %12 %res None + OpReturnValue %46 + OpFunctionEnd +%compute_main = OpFunction %void None %52 + %53 = OpLabel + %54 = OpFunctionCall %12 %subgroupMatrixLoad_29f533 + %55 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %57 = OpAccessChain %_ptr_StorageBuffer_uint %55 %uint_0 + OpCooperativeMatrixStoreKHR %57 %54 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/3f3203.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/3f3203.wgsl.expected.spvasm index d4e8520..3c44291 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/3f3203.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/3f3203.wgsl.expected.spvasm
@@ -1,110 +1,104 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_3f3203() -> subgroup_matrix_result<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_3f3203(), false, 64); -} - -Failed to generate SPIR-V: :34:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_3f3203 = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32, 1024>, read_write> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, u32, read_write> = access %6, %7 - %16:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_result<u8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_result<u8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_3f3203 - %22:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, u32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 58 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_3f3203 "subgroupMatrixLoad_3f3203" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %39 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %51 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_3f3203 = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %37 = OpVariable %_ptr_Function_12 Function %39 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpIMul %uint %28 %uint_7 + %32 = OpIAdd %uint %26 %30 + %33 = OpIAdd %uint %32 %uint_8 + %34 = OpULessThanEqual %bool %33 %uint_4096 + OpSelectionMerge %41 None + OpBranchConditional %34 %42 %41 + %42 = OpLabel + %46 = OpAccessChain %_ptr_StorageBuffer_uint %23 %26 + %48 = OpCooperativeMatrixLoadKHR %12 %46 %uint_1 %28 NonPrivatePointer + OpStore %37 %48 None + OpBranch %41 + %41 = OpLabel + %43 = OpLoad %12 %37 None + OpStore %res %43 + %45 = OpLoad %12 %res None + OpReturnValue %45 + OpFunctionEnd +%compute_main = OpFunction %void None %51 + %52 = OpLabel + %53 = OpFunctionCall %12 %subgroupMatrixLoad_3f3203 + %54 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %55 = OpAccessChain %_ptr_StorageBuffer_uint %54 %uint_0 + OpCooperativeMatrixStoreKHR %55 %53 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/567359.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/567359.wgsl.expected.spvasm index f777bb6..9b32c41 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/567359.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/567359.wgsl.expected.spvasm
@@ -1,108 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_567359() -> subgroup_matrix_right<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_567359(), false, 64); -} - -Failed to generate SPIR-V: :32:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_567359 = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32>, read> = access %sb_ro, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_ro, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, u32, read> = access %6, %7 - %18:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_right<u8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_right<u8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_567359 - %24:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, u32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %28 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_567359 "subgroupMatrixLoad_567359" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %40 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %52 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_567359 = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %38 = OpVariable %_ptr_Function_12 Function %40 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %22 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_ro %uint_0 + %25 = OpLoad %uint %arg_1 None + %26 = OpLoad %uint %arg_3 None + %27 = OpExtInst %uint %28 UMax %26 %uint_8 + %29 = OpArrayLength %uint %sb_ro 0 + %30 = OpIMul %uint %29 %uint_4 + %32 = OpIMul %uint %27 %uint_7 + %34 = OpIAdd %uint %25 %32 + %35 = OpIAdd %uint %34 %uint_8 + %36 = OpULessThanEqual %bool %35 %30 + OpSelectionMerge %42 None + OpBranchConditional %36 %43 %42 + %43 = OpLabel + %47 = OpAccessChain %_ptr_StorageBuffer_uint %22 %25 + %49 = OpCooperativeMatrixLoadKHR %12 %47 %uint_1 %27 NonPrivatePointer + OpStore %38 %49 None + OpBranch %42 + %42 = OpLabel + %44 = OpLoad %12 %38 None + OpStore %res %44 + %46 = OpLoad %12 %res None + OpReturnValue %46 + OpFunctionEnd +%compute_main = OpFunction %void None %52 + %53 = OpLabel + %54 = OpFunctionCall %12 %subgroupMatrixLoad_567359 + %55 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %57 = OpAccessChain %_ptr_StorageBuffer_uint_0 %55 %uint_0 + OpCooperativeMatrixStoreKHR %57 %54 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/58b2f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/58b2f2.wgsl.expected.spvasm index b1edb7b..0dfa90b 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/58b2f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/58b2f2.wgsl.expected.spvasm
@@ -1,108 +1,108 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_58b2f2() -> subgroup_matrix_right<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_58b2f2(), false, 64); -} - -Failed to generate SPIR-V: :32:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_58b2f2 = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32>, read> = access %sb_ro, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_ro, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, i32, read> = access %6, %7 - %18:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_right<i8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_right<i8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_58b2f2 - %24:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, i32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 62 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_58b2f2 "subgroupMatrixLoad_58b2f2" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %41 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %53 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_58b2f2 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %39 = OpVariable %_ptr_Function_13 Function %41 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_ro %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpArrayLength %uint %sb_ro 0 + %31 = OpIMul %uint %30 %uint_4 + %33 = OpIMul %uint %28 %uint_7 + %35 = OpIAdd %uint %26 %33 + %36 = OpIAdd %uint %35 %uint_8 + %37 = OpULessThanEqual %bool %36 %31 + OpSelectionMerge %43 None + OpBranchConditional %37 %44 %43 + %44 = OpLabel + %48 = OpAccessChain %_ptr_StorageBuffer_int %23 %26 + %50 = OpCooperativeMatrixLoadKHR %13 %48 %uint_1 %28 NonPrivatePointer + OpStore %39 %50 None + OpBranch %43 + %43 = OpLabel + %45 = OpLoad %13 %39 None + OpStore %res %45 + %47 = OpLoad %13 %res None + OpReturnValue %47 + OpFunctionEnd +%compute_main = OpFunction %void None %53 + %54 = OpLabel + %55 = OpFunctionCall %13 %subgroupMatrixLoad_58b2f2 + %56 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %58 = OpAccessChain %_ptr_StorageBuffer_int_0 %56 %uint_0 + OpCooperativeMatrixStoreKHR %58 %55 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/5e2602.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/5e2602.wgsl.expected.spvasm index 6925302..5ff1145 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/5e2602.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/5e2602.wgsl.expected.spvasm
@@ -1,108 +1,108 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_5e2602() -> subgroup_matrix_result<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_5e2602(), false, 64); -} - -Failed to generate SPIR-V: :32:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_5e2602 = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32>, read> = access %sb_ro, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_ro, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, u32, read> = access %6, %7 - %18:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_result<u8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_result<u8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_5e2602 - %24:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, u32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 62 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_5e2602 "subgroupMatrixLoad_5e2602" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %41 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %53 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_5e2602 = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %39 = OpVariable %_ptr_Function_12 Function %41 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_ro %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpArrayLength %uint %sb_ro 0 + %31 = OpIMul %uint %30 %uint_4 + %33 = OpIMul %uint %28 %uint_7 + %35 = OpIAdd %uint %26 %33 + %36 = OpIAdd %uint %35 %uint_8 + %37 = OpULessThanEqual %bool %36 %31 + OpSelectionMerge %43 None + OpBranchConditional %37 %44 %43 + %44 = OpLabel + %48 = OpAccessChain %_ptr_StorageBuffer_uint %23 %26 + %50 = OpCooperativeMatrixLoadKHR %12 %48 %uint_1 %28 NonPrivatePointer + OpStore %39 %50 None + OpBranch %43 + %43 = OpLabel + %45 = OpLoad %12 %39 None + OpStore %res %45 + %47 = OpLoad %12 %res None + OpReturnValue %47 + OpFunctionEnd +%compute_main = OpFunction %void None %53 + %54 = OpLabel + %55 = OpFunctionCall %12 %subgroupMatrixLoad_5e2602 + %56 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %58 = OpAccessChain %_ptr_StorageBuffer_uint_0 %56 %uint_0 + OpCooperativeMatrixStoreKHR %58 %55 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/664e6e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/664e6e.wgsl.expected.spvasm index a42779b..5b97b2a 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/664e6e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/664e6e.wgsl.expected.spvasm
@@ -1,108 +1,106 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_664e6e() -> subgroup_matrix_right<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_664e6e(), false, 64); -} - -Failed to generate SPIR-V: :32:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_664e6e = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32>, read_write> = access %sb_rw, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_rw, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, i32, read_write> = access %6, %7 - %18:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_right<i8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_right<i8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_664e6e - %24:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, i32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_664e6e "subgroupMatrixLoad_664e6e" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %41 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %53 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_664e6e = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %39 = OpVariable %_ptr_Function_13 Function %41 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_rw %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpArrayLength %uint %sb_rw 0 + %31 = OpIMul %uint %30 %uint_4 + %33 = OpIMul %uint %28 %uint_7 + %35 = OpIAdd %uint %26 %33 + %36 = OpIAdd %uint %35 %uint_8 + %37 = OpULessThanEqual %bool %36 %31 + OpSelectionMerge %43 None + OpBranchConditional %37 %44 %43 + %44 = OpLabel + %48 = OpAccessChain %_ptr_StorageBuffer_int %23 %26 + %50 = OpCooperativeMatrixLoadKHR %13 %48 %uint_1 %28 NonPrivatePointer + OpStore %39 %50 None + OpBranch %43 + %43 = OpLabel + %45 = OpLoad %13 %39 None + OpStore %res %45 + %47 = OpLoad %13 %res None + OpReturnValue %47 + OpFunctionEnd +%compute_main = OpFunction %void None %53 + %54 = OpLabel + %55 = OpFunctionCall %13 %subgroupMatrixLoad_664e6e + %56 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %58 = OpAccessChain %_ptr_StorageBuffer_int %56 %uint_0 + OpCooperativeMatrixStoreKHR %58 %55 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/6778bb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/6778bb.wgsl.expected.spvasm index 427adde..97810e1 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/6778bb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/6778bb.wgsl.expected.spvasm
@@ -1,110 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_6778bb() -> subgroup_matrix_left<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_6778bb(), false, 64); -} - -Failed to generate SPIR-V: :34:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_6778bb = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32, 1024>, read> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, i32, read> = access %6, %7 - %16:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_left<i8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_left<i8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_6778bb - %22:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, i32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 60 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_6778bb "subgroupMatrixLoad_6778bb" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + OpDecorate %8 NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %39 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %51 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024_0 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_6778bb = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %37 = OpVariable %_ptr_Function_13 Function %39 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %24 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpIMul %uint %28 %uint_7 + %32 = OpIAdd %uint %26 %30 + %33 = OpIAdd %uint %32 %uint_8 + %34 = OpULessThanEqual %bool %33 %uint_4096 + OpSelectionMerge %41 None + OpBranchConditional %34 %42 %41 + %42 = OpLabel + %46 = OpAccessChain %_ptr_StorageBuffer_int %24 %26 + %48 = OpCooperativeMatrixLoadKHR %13 %46 %uint_1 %28 NonPrivatePointer + OpStore %37 %48 None + OpBranch %41 + %41 = OpLabel + %43 = OpLoad %13 %37 None + OpStore %res %43 + %45 = OpLoad %13 %res None + OpReturnValue %45 + OpFunctionEnd +%compute_main = OpFunction %void None %51 + %52 = OpLabel + %53 = OpFunctionCall %13 %subgroupMatrixLoad_6778bb + %54 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024_0 %1 %uint_0 + %56 = OpAccessChain %_ptr_StorageBuffer_int_0 %54 %uint_0 + OpCooperativeMatrixStoreKHR %56 %53 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/86df2e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/86df2e.wgsl.expected.spvasm index 592ab46..1922d7a 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/86df2e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/86df2e.wgsl.expected.spvasm
@@ -1,110 +1,103 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_86df2e() -> subgroup_matrix_right<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_86df2e(), false, 64); -} - -Failed to generate SPIR-V: :34:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_86df2e = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32, 1024>, read_write> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, u32, read_write> = access %6, %7 - %16:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_right<u8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_right<u8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_86df2e - %22:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, u32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 57 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %28 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_86df2e "subgroupMatrixLoad_86df2e" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %38 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %50 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_86df2e = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %36 = OpVariable %_ptr_Function_12 Function %38 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %22 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %25 = OpLoad %uint %arg_1 None + %26 = OpLoad %uint %arg_3 None + %27 = OpExtInst %uint %28 UMax %26 %uint_8 + %29 = OpIMul %uint %27 %uint_7 + %31 = OpIAdd %uint %25 %29 + %32 = OpIAdd %uint %31 %uint_8 + %33 = OpULessThanEqual %bool %32 %uint_4096 + OpSelectionMerge %40 None + OpBranchConditional %33 %41 %40 + %41 = OpLabel + %45 = OpAccessChain %_ptr_StorageBuffer_uint %22 %25 + %47 = OpCooperativeMatrixLoadKHR %12 %45 %uint_1 %27 NonPrivatePointer + OpStore %36 %47 None + OpBranch %40 + %40 = OpLabel + %42 = OpLoad %12 %36 None + OpStore %res %42 + %44 = OpLoad %12 %res None + OpReturnValue %44 + OpFunctionEnd +%compute_main = OpFunction %void None %50 + %51 = OpLabel + %52 = OpFunctionCall %12 %subgroupMatrixLoad_86df2e + %53 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %54 = OpAccessChain %_ptr_StorageBuffer_uint %53 %uint_0 + OpCooperativeMatrixStoreKHR %54 %52 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/8861f0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/8861f0.wgsl.expected.spvasm index e53b1f5..c9d8a46 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/8861f0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/8861f0.wgsl.expected.spvasm
@@ -1,110 +1,104 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_8861f0() -> subgroup_matrix_right<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_8861f0(), false, 64); -} - -Failed to generate SPIR-V: :34:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_8861f0 = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32, 1024>, read_write> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, i32, read_write> = access %6, %7 - %16:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_right<i8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_right<i8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_8861f0 - %22:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, i32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 58 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_8861f0 "subgroupMatrixLoad_8861f0" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %39 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %51 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_8861f0 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %37 = OpVariable %_ptr_Function_13 Function %39 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpIMul %uint %28 %uint_7 + %32 = OpIAdd %uint %26 %30 + %33 = OpIAdd %uint %32 %uint_8 + %34 = OpULessThanEqual %bool %33 %uint_4096 + OpSelectionMerge %41 None + OpBranchConditional %34 %42 %41 + %42 = OpLabel + %46 = OpAccessChain %_ptr_StorageBuffer_int %23 %26 + %48 = OpCooperativeMatrixLoadKHR %13 %46 %uint_1 %28 NonPrivatePointer + OpStore %37 %48 None + OpBranch %41 + %41 = OpLabel + %43 = OpLoad %13 %37 None + OpStore %res %43 + %45 = OpLoad %13 %res None + OpReturnValue %45 + OpFunctionEnd +%compute_main = OpFunction %void None %51 + %52 = OpLabel + %53 = OpFunctionCall %13 %subgroupMatrixLoad_8861f0 + %54 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %55 = OpAccessChain %_ptr_StorageBuffer_int %54 %uint_0 + OpCooperativeMatrixStoreKHR %55 %53 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/91abc9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/91abc9.wgsl.expected.spvasm index 3879830..2273952 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/91abc9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/91abc9.wgsl.expected.spvasm
@@ -1,108 +1,108 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_91abc9() -> subgroup_matrix_left<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_left<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<i8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_91abc9(), false, 64); -} - -Failed to generate SPIR-V: :32:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_left<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_91abc9 = func():subgroup_matrix_left<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32>, read> = access %sb_ro, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_ro, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, i32, read> = access %6, %7 - %18:subgroup_matrix_left<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<i8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_left<i8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_left<i8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_left<i8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_left<i8, 8, 8> = call %subgroupMatrixLoad_91abc9 - %24:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, i32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 62 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_91abc9 "subgroupMatrixLoad_91abc9" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_0 = OpConstant %uint 0 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_0 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %41 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %53 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_91abc9 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %39 = OpVariable %_ptr_Function_13 Function %41 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %24 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_ro %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpArrayLength %uint %sb_ro 0 + %31 = OpIMul %uint %30 %uint_4 + %33 = OpIMul %uint %28 %uint_7 + %35 = OpIAdd %uint %26 %33 + %36 = OpIAdd %uint %35 %uint_8 + %37 = OpULessThanEqual %bool %36 %31 + OpSelectionMerge %43 None + OpBranchConditional %37 %44 %43 + %44 = OpLabel + %48 = OpAccessChain %_ptr_StorageBuffer_int %24 %26 + %50 = OpCooperativeMatrixLoadKHR %13 %48 %uint_1 %28 NonPrivatePointer + OpStore %39 %50 None + OpBranch %43 + %43 = OpLabel + %45 = OpLoad %13 %39 None + OpStore %res %45 + %47 = OpLoad %13 %res None + OpReturnValue %47 + OpFunctionEnd +%compute_main = OpFunction %void None %53 + %54 = OpLabel + %55 = OpFunctionCall %13 %subgroupMatrixLoad_91abc9 + %56 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %58 = OpAccessChain %_ptr_StorageBuffer_int_0 %56 %uint_0 + OpCooperativeMatrixStoreKHR %58 %55 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/9bc799.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/9bc799.wgsl.expected.spvasm index a3b88ce..8466c82 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/9bc799.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/9bc799.wgsl.expected.spvasm
@@ -1,110 +1,108 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_9bc799() -> subgroup_matrix_result<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_9bc799(), false, 64); -} - -Failed to generate SPIR-V: :34:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_9bc799 = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32, 1024>, read> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, i32, read> = access %6, %7 - %16:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_result<i8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_result<i8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_9bc799 - %22:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, i32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %30 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_9bc799 "subgroupMatrixLoad_9bc799" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + OpDecorate %8 NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %40 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %52 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024_0 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_9bc799 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %38 = OpVariable %_ptr_Function_13 Function %40 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %24 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %27 = OpLoad %uint %arg_1 None + %28 = OpLoad %uint %arg_3 None + %29 = OpExtInst %uint %30 UMax %28 %uint_8 + %31 = OpIMul %uint %29 %uint_7 + %33 = OpIAdd %uint %27 %31 + %34 = OpIAdd %uint %33 %uint_8 + %35 = OpULessThanEqual %bool %34 %uint_4096 + OpSelectionMerge %42 None + OpBranchConditional %35 %43 %42 + %43 = OpLabel + %47 = OpAccessChain %_ptr_StorageBuffer_int %24 %27 + %49 = OpCooperativeMatrixLoadKHR %13 %47 %uint_1 %29 NonPrivatePointer + OpStore %38 %49 None + OpBranch %42 + %42 = OpLabel + %44 = OpLoad %13 %38 None + OpStore %res %44 + %46 = OpLoad %13 %res None + OpReturnValue %46 + OpFunctionEnd +%compute_main = OpFunction %void None %52 + %53 = OpLabel + %54 = OpFunctionCall %13 %subgroupMatrixLoad_9bc799 + %55 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024_0 %1 %uint_0 + %57 = OpAccessChain %_ptr_StorageBuffer_int_0 %55 %uint_0 + OpCooperativeMatrixStoreKHR %57 %54 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/9c4b12.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/9c4b12.wgsl.expected.spvasm index 19274f8..670db00 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/9c4b12.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/9c4b12.wgsl.expected.spvasm
@@ -1,110 +1,103 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_9c4b12() -> subgroup_matrix_left<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_9c4b12(), false, 64); -} - -Failed to generate SPIR-V: :34:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_rw_block = struct @align(4), @block { - inner:SB_RW @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_rw_block, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_9c4b12 = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32, 1024>, read_write> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, u32, read_write> = access %6, %7 - %16:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_left<u8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_left<u8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_9c4b12 - %22:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, u32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 57 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %28 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpMemberName %sb_rw_block_tint_explicit_layout 0 "inner" + OpName %sb_rw_block_tint_explicit_layout "sb_rw_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_9c4b12 "subgroupMatrixLoad_9c4b12" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_rw_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_rw_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RW_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_rw_block_tint_explicit_layout = OpTypeStruct %SB_RW_tint_explicit_layout +%_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_rw_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_rw_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %38 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %50 = OpTypeFunction %void + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_9c4b12 = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %36 = OpVariable %_ptr_Function_12 Function %38 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %25 = OpLoad %uint %arg_1 None + %26 = OpLoad %uint %arg_3 None + %27 = OpExtInst %uint %28 UMax %26 %uint_8 + %29 = OpIMul %uint %27 %uint_7 + %31 = OpIAdd %uint %25 %29 + %32 = OpIAdd %uint %31 %uint_8 + %33 = OpULessThanEqual %bool %32 %uint_4096 + OpSelectionMerge %40 None + OpBranchConditional %33 %41 %40 + %41 = OpLabel + %45 = OpAccessChain %_ptr_StorageBuffer_uint %23 %25 + %47 = OpCooperativeMatrixLoadKHR %12 %45 %uint_1 %27 NonPrivatePointer + OpStore %36 %47 None + OpBranch %40 + %40 = OpLabel + %42 = OpLoad %12 %36 None + OpStore %res %42 + %44 = OpLoad %12 %res None + OpReturnValue %44 + OpFunctionEnd +%compute_main = OpFunction %void None %50 + %51 = OpLabel + %52 = OpFunctionCall %12 %subgroupMatrixLoad_9c4b12 + %53 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %54 = OpAccessChain %_ptr_StorageBuffer_uint %53 %uint_0 + OpCooperativeMatrixStoreKHR %54 %52 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/ad687c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/ad687c.wgsl.expected.spvasm index 6bcfe5c..246eca8 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/ad687c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/ad687c.wgsl.expected.spvasm
@@ -1,110 +1,106 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_ad687c() -> subgroup_matrix_left<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_ad687c(), false, 64); -} - -Failed to generate SPIR-V: :34:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_ad687c = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32, 1024>, read> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, u32, read> = access %6, %7 - %16:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_left<u8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_left<u8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_ad687c - %22:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, u32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 59 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %28 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_ad687c "subgroupMatrixLoad_ad687c" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + OpDecorate %7 NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %38 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %50 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024_0 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_ad687c = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %36 = OpVariable %_ptr_Function_12 Function %38 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %25 = OpLoad %uint %arg_1 None + %26 = OpLoad %uint %arg_3 None + %27 = OpExtInst %uint %28 UMax %26 %uint_8 + %29 = OpIMul %uint %27 %uint_7 + %31 = OpIAdd %uint %25 %29 + %32 = OpIAdd %uint %31 %uint_8 + %33 = OpULessThanEqual %bool %32 %uint_4096 + OpSelectionMerge %40 None + OpBranchConditional %33 %41 %40 + %41 = OpLabel + %45 = OpAccessChain %_ptr_StorageBuffer_uint %23 %25 + %47 = OpCooperativeMatrixLoadKHR %12 %45 %uint_1 %27 NonPrivatePointer + OpStore %36 %47 None + OpBranch %40 + %40 = OpLabel + %42 = OpLoad %12 %36 None + OpStore %res %42 + %44 = OpLoad %12 %res None + OpReturnValue %44 + OpFunctionEnd +%compute_main = OpFunction %void None %50 + %51 = OpLabel + %52 = OpFunctionCall %12 %subgroupMatrixLoad_ad687c + %53 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024_0 %1 %uint_0 + %55 = OpAccessChain %_ptr_StorageBuffer_uint_0 %53 %uint_0 + OpCooperativeMatrixStoreKHR %55 %52 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/b19701.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/b19701.wgsl.expected.spvasm index 6f366b2..09e2cd6 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/b19701.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/b19701.wgsl.expected.spvasm
@@ -1,110 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RO { - arg_0 : array<i32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_b19701() -> subgroup_matrix_right<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_right<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<i8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_b19701(), false, 64); -} - -Failed to generate SPIR-V: :34:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>>(ptr<storage, i32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_right<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<i32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_b19701 = func():subgroup_matrix_right<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32, 1024>, read> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, i32, read> = access %6, %7 - %16:subgroup_matrix_right<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<i8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_right<i8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_right<i8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_right<i8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_right<i8, 8, 8> = call %subgroupMatrixLoad_b19701 - %22:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, i32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 60 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_b19701 "subgroupMatrixLoad_b19701" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %8 DescriptorSet 0 + OpDecorate %8 Binding 1 + OpDecorate %8 NonWritable + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %8 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_1 = OpConstant %uint 1 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_1 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_0 = OpConstant %uint 0 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %39 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %51 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024_0 = OpTypePointer StorageBuffer %_arr_int_uint_1024 +%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_b19701 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %37 = OpVariable %_ptr_Function_13 Function %39 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %8 %uint_0 %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpIMul %uint %28 %uint_7 + %32 = OpIAdd %uint %26 %30 + %33 = OpIAdd %uint %32 %uint_8 + %34 = OpULessThanEqual %bool %33 %uint_4096 + OpSelectionMerge %41 None + OpBranchConditional %34 %42 %41 + %42 = OpLabel + %46 = OpAccessChain %_ptr_StorageBuffer_int %23 %26 + %48 = OpCooperativeMatrixLoadKHR %13 %46 %uint_1 %28 NonPrivatePointer + OpStore %37 %48 None + OpBranch %41 + %41 = OpLabel + %43 = OpLoad %13 %37 None + OpStore %res %43 + %45 = OpLoad %13 %res None + OpReturnValue %45 + OpFunctionEnd +%compute_main = OpFunction %void None %51 + %52 = OpLabel + %53 = OpFunctionCall %13 %subgroupMatrixLoad_b19701 + %54 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024_0 %1 %uint_0 + %56 = OpAccessChain %_ptr_StorageBuffer_int_0 %54 %uint_0 + OpCooperativeMatrixStoreKHR %56 %53 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/bcfcb6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/bcfcb6.wgsl.expected.spvasm index 1abd6f3..a4c2d07 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/bcfcb6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/bcfcb6.wgsl.expected.spvasm
@@ -1,108 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_bcfcb6() -> subgroup_matrix_left<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_left<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_left<u8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_bcfcb6(), false, 64); -} - -Failed to generate SPIR-V: :32:46 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_left<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_ro:ptr<storage, SB_RO, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_bcfcb6 = func():subgroup_matrix_left<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32>, read> = access %sb_ro, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_ro, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, u32, read> = access %6, %7 - %18:subgroup_matrix_left<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_left<u8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_left<u8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_left<u8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_left<u8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_left<u8, 8, 8> = call %subgroupMatrixLoad_bcfcb6 - %24:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, u32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %28 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpName %sb_ro "sb_ro" + OpName %subgroupMatrixLoad_bcfcb6 "subgroupMatrixLoad_bcfcb6" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RO_tint_explicit_layout Block + OpDecorate %sb_ro DescriptorSet 0 + OpDecorate %sb_ro Binding 1 + OpDecorate %sb_ro NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RO_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RO_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RO_tint_explicit_layout + %sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_0 = OpConstant %uint 0 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_0 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %40 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %52 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_bcfcb6 = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %38 = OpVariable %_ptr_Function_12 Function %40 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_ro %uint_0 + %25 = OpLoad %uint %arg_1 None + %26 = OpLoad %uint %arg_3 None + %27 = OpExtInst %uint %28 UMax %26 %uint_8 + %29 = OpArrayLength %uint %sb_ro 0 + %30 = OpIMul %uint %29 %uint_4 + %32 = OpIMul %uint %27 %uint_7 + %34 = OpIAdd %uint %25 %32 + %35 = OpIAdd %uint %34 %uint_8 + %36 = OpULessThanEqual %bool %35 %30 + OpSelectionMerge %42 None + OpBranchConditional %36 %43 %42 + %43 = OpLabel + %47 = OpAccessChain %_ptr_StorageBuffer_uint %23 %25 + %49 = OpCooperativeMatrixLoadKHR %12 %47 %uint_1 %27 NonPrivatePointer + OpStore %38 %49 None + OpBranch %42 + %42 = OpLabel + %44 = OpLoad %12 %38 None + OpStore %res %44 + %46 = OpLoad %12 %res None + OpReturnValue %46 + OpFunctionEnd +%compute_main = OpFunction %void None %52 + %53 = OpLabel + %54 = OpFunctionCall %12 %subgroupMatrixLoad_bcfcb6 + %55 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %57 = OpAccessChain %_ptr_StorageBuffer_uint_0 %55 %uint_0 + OpCooperativeMatrixStoreKHR %57 %54 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/d72b92.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/d72b92.wgsl.expected.spvasm index 455594c..66be45a 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/d72b92.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/d72b92.wgsl.expected.spvasm
@@ -1,110 +1,106 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_d72b92() -> subgroup_matrix_right<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_d72b92(), false, 64); -} - -Failed to generate SPIR-V: :34:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_d72b92 = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32, 1024>, read> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, u32, read> = access %6, %7 - %16:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_right<u8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_right<u8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_d72b92 - %22:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, u32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 59 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %28 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_d72b92 "subgroupMatrixLoad_d72b92" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + OpDecorate %7 NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %38 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %50 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024_0 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_d72b92 = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %36 = OpVariable %_ptr_Function_12 Function %38 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %22 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %25 = OpLoad %uint %arg_1 None + %26 = OpLoad %uint %arg_3 None + %27 = OpExtInst %uint %28 UMax %26 %uint_8 + %29 = OpIMul %uint %27 %uint_7 + %31 = OpIAdd %uint %25 %29 + %32 = OpIAdd %uint %31 %uint_8 + %33 = OpULessThanEqual %bool %32 %uint_4096 + OpSelectionMerge %40 None + OpBranchConditional %33 %41 %40 + %41 = OpLabel + %45 = OpAccessChain %_ptr_StorageBuffer_uint %22 %25 + %47 = OpCooperativeMatrixLoadKHR %12 %45 %uint_1 %27 NonPrivatePointer + OpStore %36 %47 None + OpBranch %40 + %40 = OpLabel + %42 = OpLoad %12 %36 None + OpStore %res %42 + %44 = OpLoad %12 %res None + OpReturnValue %44 + OpFunctionEnd +%compute_main = OpFunction %void None %50 + %51 = OpLabel + %52 = OpFunctionCall %12 %subgroupMatrixLoad_d72b92 + %53 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024_0 %1 %uint_0 + %55 = OpAccessChain %_ptr_StorageBuffer_uint_0 %53 %uint_0 + OpCooperativeMatrixStoreKHR %55 %52 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/e40231.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/e40231.wgsl.expected.spvasm index 078cb99..957c433 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/e40231.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/e40231.wgsl.expected.spvasm
@@ -1,108 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<i32, 1024>; - -struct SB_RW { - arg_0 : array<i32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_e40231() -> subgroup_matrix_result<i8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_result<i8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<i8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_e40231(), false, 64); -} - -Failed to generate SPIR-V: :32:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>>(ptr<storage, i32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, i32, read_write>, subgroup_matrix_result<i8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<i32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<i32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_e40231 = func():subgroup_matrix_result<i8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<i32>, read_write> = access %sb_rw, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_rw, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, i32, read_write> = access %6, %7 - %18:subgroup_matrix_result<i8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<i8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_result<i8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_result<i8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_result<i8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_result<i8, 8, 8> = call %subgroupMatrixLoad_e40231 - %24:ptr<storage, array<i32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, i32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 62 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %30 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_e40231 "subgroupMatrixLoad_e40231" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_int_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_int_uint_1024 = OpTypeArray %int %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_int = OpTypeRuntimeArray %int +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %char = OpTypeInt 8 1 + %uint_2 = OpConstant %uint 2 + %13 = OpTypeCooperativeMatrixKHR %char %uint_3 %uint_8 %uint_8 %uint_2 + %18 = OpTypeFunction %13 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__runtimearr_int = OpTypePointer StorageBuffer %_runtimearr_int + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_13 = OpTypePointer Function %13 + %char_0 = OpConstant %char 0 + %42 = OpConstantComposite %13 %char_0 +%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int + %void = OpTypeVoid + %54 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_int_uint_1024 = OpTypePointer StorageBuffer %_arr_int_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_e40231 = OpFunction %13 None %18 + %19 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %40 = OpVariable %_ptr_Function_13 Function %42 + %res = OpVariable %_ptr_Function_13 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %24 = OpAccessChain %_ptr_StorageBuffer__runtimearr_int %sb_rw %uint_0 + %27 = OpLoad %uint %arg_1 None + %28 = OpLoad %uint %arg_3 None + %29 = OpExtInst %uint %30 UMax %28 %uint_8 + %31 = OpArrayLength %uint %sb_rw 0 + %32 = OpIMul %uint %31 %uint_4 + %34 = OpIMul %uint %29 %uint_7 + %36 = OpIAdd %uint %27 %34 + %37 = OpIAdd %uint %36 %uint_8 + %38 = OpULessThanEqual %bool %37 %32 + OpSelectionMerge %44 None + OpBranchConditional %38 %45 %44 + %45 = OpLabel + %49 = OpAccessChain %_ptr_StorageBuffer_int %24 %27 + %51 = OpCooperativeMatrixLoadKHR %13 %49 %uint_1 %29 NonPrivatePointer + OpStore %40 %51 None + OpBranch %44 + %44 = OpLabel + %46 = OpLoad %13 %40 None + OpStore %res %46 + %48 = OpLoad %13 %res None + OpReturnValue %48 + OpFunctionEnd +%compute_main = OpFunction %void None %54 + %55 = OpLabel + %56 = OpFunctionCall %13 %subgroupMatrixLoad_e40231 + %57 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_1024 %1 %uint_0 + %59 = OpAccessChain %_ptr_StorageBuffer_int %57 %uint_0 + OpCooperativeMatrixStoreKHR %59 %56 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/e5381c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/e5381c.wgsl.expected.spvasm index de589ef..c1114ab 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/e5381c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/e5381c.wgsl.expected.spvasm
@@ -1,108 +1,106 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_e5381c() -> subgroup_matrix_result<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_e5381c(), false, 64); -} - -Failed to generate SPIR-V: :32:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_e5381c = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32>, read_write> = access %sb_rw, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_rw, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, u32, read_write> = access %6, %7 - %18:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_result<u8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_result<u8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_e5381c - %24:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, u32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 61 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_e5381c "subgroupMatrixLoad_e5381c" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %41 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %53 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_e5381c = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %39 = OpVariable %_ptr_Function_12 Function %41 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_rw %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpArrayLength %uint %sb_rw 0 + %31 = OpIMul %uint %30 %uint_4 + %33 = OpIMul %uint %28 %uint_7 + %35 = OpIAdd %uint %26 %33 + %36 = OpIAdd %uint %35 %uint_8 + %37 = OpULessThanEqual %bool %36 %31 + OpSelectionMerge %43 None + OpBranchConditional %37 %44 %43 + %44 = OpLabel + %48 = OpAccessChain %_ptr_StorageBuffer_uint %23 %26 + %50 = OpCooperativeMatrixLoadKHR %12 %48 %uint_1 %28 NonPrivatePointer + OpStore %39 %50 None + OpBranch %43 + %43 = OpLabel + %45 = OpLoad %12 %39 None + OpStore %res %45 + %47 = OpLoad %12 %res None + OpReturnValue %47 + OpFunctionEnd +%compute_main = OpFunction %void None %53 + %54 = OpLabel + %55 = OpFunctionCall %12 %subgroupMatrixLoad_e5381c + %56 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %58 = OpAccessChain %_ptr_StorageBuffer_uint %56 %uint_0 + OpCooperativeMatrixStoreKHR %58 %55 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/f364a9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/f364a9.wgsl.expected.spvasm index b298a45..c83ff87 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/f364a9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/f364a9.wgsl.expected.spvasm
@@ -1,108 +1,105 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RW { - arg_0 : array<u32>, -} - -@group(0) @binding(1) var<storage, read_write> sb_rw : SB_RW; - -fn subgroupMatrixLoad_f364a9() -> subgroup_matrix_right<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_right<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_right<u8, 8, 8>>(&(sb_rw.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_f364a9(), false, 64); -} - -Failed to generate SPIR-V: :32:47 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>>(ptr<storage, u32, read_write>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %18:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %17, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:30:7 note: in block - $B3: { # true - ^^^ - -:48:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_right<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:44:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RW = struct @align(4), @block { - arg_0:array<u32> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %sb_rw:ptr<storage, SB_RW, read_write> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_f364a9 = func():subgroup_matrix_right<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32>, read_write> = access %sb_rw, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = spirv.array_length %sb_rw, 0u - %11:u32 = mul %10, 4u - %12:u32 = mul %9, 7u - %13:u32 = add %7, %12 - %14:u32 = add %13, 8u - %15:bool = lte %14, %11 - %16:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var undef - if %15 [t: $B3] { # if_1 - $B3: { # true - %17:ptr<storage, u32, read_write> = access %6, %7 - %18:subgroup_matrix_right<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_right<u8, 8, 8>> %17, 1u, %9, 32u - store %16, %18 - exit_if # if_1 - } - } - %19:subgroup_matrix_right<u8, 8, 8> = load %16 - %res:ptr<function, subgroup_matrix_right<u8, 8, 8>, read_write> = var %19 - %21:subgroup_matrix_right<u8, 8, 8> = load %res - ret %21 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %23:subgroup_matrix_right<u8, 8, 8> = call %subgroupMatrixLoad_f364a9 - %24:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %25:ptr<storage, u32, read_write> = access %24, 0u - %26:void = spirv.cooperative_matrix_store %25, %23, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 60 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %28 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RW_tint_explicit_layout 0 "arg_0" + OpName %SB_RW_tint_explicit_layout "SB_RW_tint_explicit_layout" + OpName %sb_rw "sb_rw" + OpName %subgroupMatrixLoad_f364a9 "subgroupMatrixLoad_f364a9" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpDecorate %_runtimearr_uint ArrayStride 4 + OpMemberDecorate %SB_RW_tint_explicit_layout 0 Offset 0 + OpDecorate %SB_RW_tint_explicit_layout Block + OpDecorate %sb_rw DescriptorSet 0 + OpDecorate %sb_rw Binding 1 + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%_runtimearr_uint = OpTypeRuntimeArray %uint +%SB_RW_tint_explicit_layout = OpTypeStruct %_runtimearr_uint +%_ptr_StorageBuffer_SB_RW_tint_explicit_layout = OpTypePointer StorageBuffer %SB_RW_tint_explicit_layout + %sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_1 = OpConstant %uint 1 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_1 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint + %uint_0 = OpConstant %uint 0 + %uint_4 = OpConstant %uint 4 + %uint_7 = OpConstant %uint 7 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %40 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %52 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_f364a9 = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %38 = OpVariable %_ptr_Function_12 Function %40 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %22 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %sb_rw %uint_0 + %25 = OpLoad %uint %arg_1 None + %26 = OpLoad %uint %arg_3 None + %27 = OpExtInst %uint %28 UMax %26 %uint_8 + %29 = OpArrayLength %uint %sb_rw 0 + %30 = OpIMul %uint %29 %uint_4 + %32 = OpIMul %uint %27 %uint_7 + %34 = OpIAdd %uint %25 %32 + %35 = OpIAdd %uint %34 %uint_8 + %36 = OpULessThanEqual %bool %35 %30 + OpSelectionMerge %42 None + OpBranchConditional %36 %43 %42 + %43 = OpLabel + %47 = OpAccessChain %_ptr_StorageBuffer_uint %22 %25 + %49 = OpCooperativeMatrixLoadKHR %12 %47 %uint_1 %27 NonPrivatePointer + OpStore %38 %49 None + OpBranch %42 + %42 = OpLabel + %44 = OpLoad %12 %38 None + OpStore %res %44 + %46 = OpLoad %12 %res None + OpReturnValue %46 + OpFunctionEnd +%compute_main = OpFunction %void None %52 + %53 = OpLabel + %54 = OpFunctionCall %12 %subgroupMatrixLoad_f364a9 + %55 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %1 %uint_0 + %57 = OpAccessChain %_ptr_StorageBuffer_uint %55 %uint_0 + OpCooperativeMatrixStoreKHR %57 %54 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/subgroupMatrixLoad/f86f9f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/subgroupMatrixLoad/f86f9f.wgsl.expected.spvasm index c77819b..01a3ca1 100644 --- a/test/tint/builtins/gen/var/subgroupMatrixLoad/f86f9f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/subgroupMatrixLoad/f86f9f.wgsl.expected.spvasm
@@ -1,110 +1,107 @@ -SKIP: FAILED - - -enable chromium_experimental_subgroup_matrix; - -@group(0) @binding(0) var<storage, read_write> prevent_dce : array<u32, 1024>; - -struct SB_RO { - arg_0 : array<u32, 1024>, -} - -@group(0) @binding(1) var<storage, read> sb_ro : SB_RO; - -fn subgroupMatrixLoad_f86f9f() -> subgroup_matrix_result<u8, 8, 8> { - var arg_1 = 1u; - const arg_2 = true; - var arg_3 = 8u; - var res : subgroup_matrix_result<u8, 8, 8> = subgroupMatrixLoad<subgroup_matrix_result<u8, 8, 8>>(&(sb_ro.arg_0), arg_1, arg_2, arg_3); - return res; -} - -@compute @workgroup_size(1) -fn compute_main() { - subgroupMatrixStore(&(prevent_dce), 0, subgroupMatrixLoad_f86f9f(), false, 64); -} - -Failed to generate SPIR-V: :34:48 error: spirv.cooperative_matrix_load: no matching call to 'spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>>(ptr<storage, u32, read>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_load<T ✗ >(ptr<workgroup' or 'storage, S, read' or 'read_write> ✗ , u32 ✓ , u32 ✓ , u32 ✓ ) -> T' where: - ✗ 'T' is 'subgroup_matrix<K, S, C, R>' - ✗ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %16:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %15, 1u, %9, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:32:7 note: in block - $B3: { # true - ^^^ - -:50:16 error: spirv.cooperative_matrix_store: no matching call to 'spirv.cooperative_matrix_store(ptr<storage, u32, read_write>, subgroup_matrix_result<u8, 8, 8>, u32, u32, u32)' - -1 candidate function: - • 'spirv.cooperative_matrix_store(ptr<workgroup' or 'storage, S, write' or 'read_write> ✓ , subgroup_matrix<K, S, C, R> ✗ , u32 ✓ , u32 ✓ , u32 ✓ )' where: - ✓ 'S' is 'f32', 'i32', 'u32' or 'f16' - - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -:46:3 note: in block - $B4: { - ^^^ - -note: # Disassembly -SB_RO = struct @align(4) { - arg_0:array<u32, 1024> @offset(0) -} - -prevent_dce_block = struct @align(4), @block { - inner:array<u32, 1024> @offset(0) -} - -sb_ro_block = struct @align(4), @block { - inner:SB_RO @offset(0) -} - -$B1: { # root - %1:ptr<storage, prevent_dce_block, read_write> = var undef @binding_point(0, 0) - %2:ptr<storage, sb_ro_block, read> = var undef @binding_point(0, 1) -} - -%subgroupMatrixLoad_f86f9f = func():subgroup_matrix_result<u8, 8, 8> { - $B2: { - %arg_1:ptr<function, u32, read_write> = var 1u - %arg_3:ptr<function, u32, read_write> = var 8u - %6:ptr<storage, array<u32, 1024>, read> = access %2, 0u, 0u - %7:u32 = load %arg_1 - %8:u32 = load %arg_3 - %9:u32 = max %8, 8u - %10:u32 = mul %9, 7u - %11:u32 = add %7, %10 - %12:u32 = add %11, 8u - %13:bool = lte %12, 4096u - %14:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var undef - if %13 [t: $B3] { # if_1 - $B3: { # true - %15:ptr<storage, u32, read> = access %6, %7 - %16:subgroup_matrix_result<u8, 8, 8> = spirv.cooperative_matrix_load<subgroup_matrix_result<u8, 8, 8>> %15, 1u, %9, 32u - store %14, %16 - exit_if # if_1 - } - } - %17:subgroup_matrix_result<u8, 8, 8> = load %14 - %res:ptr<function, subgroup_matrix_result<u8, 8, 8>, read_write> = var %17 - %19:subgroup_matrix_result<u8, 8, 8> = load %res - ret %19 - } -} -%compute_main = @compute @workgroup_size(1i, 1i, 1i) func():void { - $B4: { - %21:subgroup_matrix_result<u8, 8, 8> = call %subgroupMatrixLoad_f86f9f - %22:ptr<storage, array<u32, 1024>, read_write> = access %1, 0u - %23:ptr<storage, u32, read_write> = access %22, 0u - %24:void = spirv.cooperative_matrix_store %23, %21, 0u, 64u, 32u - ret - } -} - - -tint executable returned error: exit status 1 +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 1 +; Bound: 60 +; Schema: 0 + OpCapability Shader + OpCapability VulkanMemoryModel + OpCapability VulkanMemoryModelDeviceScope + OpCapability CooperativeMatrixKHR + OpCapability Int8 + OpExtension "SPV_KHR_vulkan_memory_model" + OpExtension "SPV_KHR_cooperative_matrix" + %29 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical Vulkan + OpEntryPoint GLCompute %compute_main "compute_main" + OpExecutionMode %compute_main LocalSize 1 1 1 + OpMemberName %prevent_dce_block_tint_explicit_layout 0 "inner" + OpName %prevent_dce_block_tint_explicit_layout "prevent_dce_block_tint_explicit_layout" + OpMemberName %SB_RO_tint_explicit_layout 0 "arg_0" + OpName %SB_RO_tint_explicit_layout "SB_RO_tint_explicit_layout" + OpMemberName %sb_ro_block_tint_explicit_layout 0 "inner" + OpName %sb_ro_block_tint_explicit_layout "sb_ro_block_tint_explicit_layout" + OpName %subgroupMatrixLoad_f86f9f "subgroupMatrixLoad_f86f9f" + OpName %arg_1 "arg_1" + OpName %arg_3 "arg_3" + OpName %res "res" + OpName %compute_main "compute_main" + OpDecorate %_arr_uint_uint_1024 ArrayStride 4 + OpMemberDecorate %prevent_dce_block_tint_explicit_layout 0 Offset 0 + OpDecorate %prevent_dce_block_tint_explicit_layout Block + OpDecorate %1 DescriptorSet 0 + OpDecorate %1 Binding 0 + OpMemberDecorate %SB_RO_tint_explicit_layout 0 Offset 0 + OpMemberDecorate %sb_ro_block_tint_explicit_layout 0 Offset 0 + OpDecorate %sb_ro_block_tint_explicit_layout Block + OpDecorate %7 DescriptorSet 0 + OpDecorate %7 Binding 1 + OpDecorate %7 NonWritable + %uint = OpTypeInt 32 0 + %uint_1024 = OpConstant %uint 1024 +%_arr_uint_uint_1024 = OpTypeArray %uint %uint_1024 +%prevent_dce_block_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout = OpTypePointer StorageBuffer %prevent_dce_block_tint_explicit_layout + %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block_tint_explicit_layout StorageBuffer +%SB_RO_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_1024 +%sb_ro_block_tint_explicit_layout = OpTypeStruct %SB_RO_tint_explicit_layout +%_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout = OpTypePointer StorageBuffer %sb_ro_block_tint_explicit_layout + %7 = OpVariable %_ptr_StorageBuffer_sb_ro_block_tint_explicit_layout StorageBuffer + %uint_3 = OpConstant %uint 3 + %uint_8 = OpConstant %uint 8 + %uchar = OpTypeInt 8 0 + %uint_2 = OpConstant %uint 2 + %12 = OpTypeCooperativeMatrixKHR %uchar %uint_3 %uint_8 %uint_8 %uint_2 + %17 = OpTypeFunction %12 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_1 = OpConstant %uint 1 +%_ptr_StorageBuffer__arr_uint_uint_1024 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 + %uint_0 = OpConstant %uint 0 + %uint_7 = OpConstant %uint 7 + %uint_4096 = OpConstant %uint 4096 + %bool = OpTypeBool +%_ptr_Function_12 = OpTypePointer Function %12 + %uchar_0 = OpConstant %uchar 0 + %39 = OpConstantComposite %12 %uchar_0 +%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint + %void = OpTypeVoid + %51 = OpTypeFunction %void +%_ptr_StorageBuffer__arr_uint_uint_1024_0 = OpTypePointer StorageBuffer %_arr_uint_uint_1024 +%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint + %uint_64 = OpConstant %uint 64 +%subgroupMatrixLoad_f86f9f = OpFunction %12 None %17 + %18 = OpLabel + %arg_1 = OpVariable %_ptr_Function_uint Function + %arg_3 = OpVariable %_ptr_Function_uint Function + %37 = OpVariable %_ptr_Function_12 Function %39 + %res = OpVariable %_ptr_Function_12 Function + OpStore %arg_1 %uint_1 + OpStore %arg_3 %uint_8 + %23 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024 %7 %uint_0 %uint_0 + %26 = OpLoad %uint %arg_1 None + %27 = OpLoad %uint %arg_3 None + %28 = OpExtInst %uint %29 UMax %27 %uint_8 + %30 = OpIMul %uint %28 %uint_7 + %32 = OpIAdd %uint %26 %30 + %33 = OpIAdd %uint %32 %uint_8 + %34 = OpULessThanEqual %bool %33 %uint_4096 + OpSelectionMerge %41 None + OpBranchConditional %34 %42 %41 + %42 = OpLabel + %46 = OpAccessChain %_ptr_StorageBuffer_uint %23 %26 + %48 = OpCooperativeMatrixLoadKHR %12 %46 %uint_1 %28 NonPrivatePointer + OpStore %37 %48 None + OpBranch %41 + %41 = OpLabel + %43 = OpLoad %12 %37 None + OpStore %res %43 + %45 = OpLoad %12 %res None + OpReturnValue %45 + OpFunctionEnd +%compute_main = OpFunction %void None %51 + %52 = OpLabel + %53 = OpFunctionCall %12 %subgroupMatrixLoad_f86f9f + %54 = OpAccessChain %_ptr_StorageBuffer__arr_uint_uint_1024_0 %1 %uint_0 + %56 = OpAccessChain %_ptr_StorageBuffer_uint_0 %54 %uint_0 + OpCooperativeMatrixStoreKHR %56 %53 %uint_0 %uint_64 NonPrivatePointer + OpReturn + OpFunctionEnd