1278 {
1280 case BuilderOp::push_condition_mask:
1281 case BuilderOp::push_loop_mask:
1282 case BuilderOp::push_return_mask:
1283 return 1;
1284
1285 case BuilderOp::push_src_rgba:
1286 case BuilderOp::push_dst_rgba:
1287 case BuilderOp::push_device_xy01:
1288 return 4;
1289
1290 case BuilderOp::push_immutable:
1291 case BuilderOp::push_immutable_indirect:
1292 case BuilderOp::push_constant:
1293 case BuilderOp::push_slots:
1294 case BuilderOp::push_slots_indirect:
1295 case BuilderOp::push_uniform:
1296 case BuilderOp::push_uniform_indirect:
1297 case BuilderOp::push_clone:
1298 case BuilderOp::push_clone_from_stack:
1299 case BuilderOp::push_clone_indirect_from_stack:
1300 case BuilderOp::pad_stack:
1302
1303 case BuilderOp::pop_condition_mask:
1304 case BuilderOp::pop_loop_mask:
1305 case BuilderOp::pop_and_reenable_loop_mask:
1306 case BuilderOp::pop_return_mask:
1307 return -1;
1308
1309 case BuilderOp::pop_src_rgba:
1310 case BuilderOp::pop_dst_rgba:
1311 return -4;
1312
1315 case BuilderOp::discard_stack:
1316 case BuilderOp::select:
1318
1321 return 2 * -
inst.fImmA;
1322
1323 case BuilderOp::swizzle_1:
1324 return 1 -
inst.fImmA;
1325 case BuilderOp::swizzle_2:
1326 return 2 -
inst.fImmA;
1327 case BuilderOp::swizzle_3:
1328 return 3 -
inst.fImmA;
1329 case BuilderOp::swizzle_4:
1330 return 4 -
inst.fImmA;
1331
1332 case BuilderOp::dot_2_floats:
1333 return -3;
1334 case BuilderOp::dot_3_floats:
1335 return -5;
1336 case BuilderOp::dot_4_floats:
1337 return -7;
1338
1339 case BuilderOp::refract_4_floats:
1340 return -5;
1341
1342 case BuilderOp::matrix_multiply_2:
1343 case BuilderOp::matrix_multiply_3:
1344 case BuilderOp::matrix_multiply_4:
1345
1347
1349 int consumed =
inst.fImmA;
1350 int generated =
inst.fImmB;
1351 return generated - consumed;
1352 }
1356 default:
1357 return 0;
1358 }
1359}
#define ALL_N_WAY_TERNARY_OP_CASES
#define ALL_MULTI_SLOT_TERNARY_OP_CASES
#define ALL_N_WAY_BINARY_OP_CASES
#define ALL_MULTI_SLOT_UNARY_OP_CASES
#define ALL_MULTI_SLOT_BINARY_OP_CASES
#define ALL_SINGLE_SLOT_UNARY_OP_CASES
SI Vec< sizeof...(Ix), T > shuffle(const Vec< N, T > &)