brw_set_default_access_mode(p, BRW_ALIGN_16);
- for (unsigned i = 0; i < sizeof(vstride) / sizeof(vstride[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(vstride); i++) {
brw_ADD(p, g0, g0, g0);
brw_inst_set_src0_vstride(&devinfo, last_inst, vstride[i].vstride);
clear_instructions(p);
}
- for (unsigned i = 0; i < sizeof(vstride) / sizeof(vstride[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(vstride); i++) {
brw_ADD(p, g0, g0, g0);
brw_inst_set_src1_vstride(&devinfo, last_inst, vstride[i].vstride);
{ BRW_REGISTER_TYPE_B , BRW_REGISTER_TYPE_D , 0, 0, 0, false },
};
- for (unsigned i = 0; i < sizeof(move) / sizeof(move[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(move); i++) {
brw_MOV(p, retype(g0, move[i].dst_type), retype(g0, move[i].src_type));
brw_inst_set_src0_negate(&devinfo, last_inst, move[i].neg);
brw_inst_set_src0_abs(&devinfo, last_inst, move[i].abs);
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
if (!devinfo.has_64bit_types && type_sz(inst[i].src_type) == 8)
continue;
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
if (!devinfo.has_64bit_types &&
(type_sz(inst[i].src_type) == 8 || type_sz(inst[i].dst_type) == 8)) {
continue;
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
brw_ADD(p, retype(g0, inst[i].dst_type),
retype(g0, inst[i].src0_type),
retype(g0, inst[i].src1_type));
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
brw_ADD(p, retype(g0, inst[i].dst_type),
retype(g0, inst[i].src0_type),
retype(g0, inst[i].src1_type));
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
brw_ADD(p, retype(g0, inst[i].dst_type),
retype(inst[i].read_acc ? acc0 : g0, inst[i].src0_type),
retype(g0, inst[i].src1_type));
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
if (inst[i].opcode == BRW_OPCODE_MAC) {
brw_MAC(p, retype(g0, inst[i].dst_type),
retype(g0, inst[i].src0_type),
if (devinfo.gen < 9)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
gen6_math(p, retype(g0, inst[i].dst_type),
BRW_MATH_FUNCTION_POW,
retype(g0, inst[i].src0_type),
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
brw_ADD(p, retype(g0, inst[i].dst_type),
retype(g0, inst[i].src0_type),
retype(g0, inst[i].src1_type));
brw_set_default_access_mode(p, BRW_ALIGN_16);
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
brw_ADD(p, retype(g0, inst[i].dst_type),
retype(g0, inst[i].src0_type),
retype(g0, inst[i].src1_type));
brw_set_default_access_mode(p, BRW_ALIGN_16);
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
brw_ADD(p, retype(g0, inst[i].dst_type),
retype(g0, inst[i].src0_type),
retype(g0, inst[i].src1_type));
brw_set_default_access_mode(p, BRW_ALIGN_16);
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
brw_ADD(p, retype(g0, inst[i].dst_type),
retype(inst[i].read_acc ? acc0 : g0, inst[i].src0_type),
retype(g0, inst[i].src1_type));
brw_set_default_access_mode(p, BRW_ALIGN_16);
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
gen6_math(p, retype(g0, inst[i].dst_type),
BRW_MATH_FUNCTION_POW,
retype(g0, inst[i].src0_type),
{ BRW_REGISTER_TYPE_W, BRW_REGISTER_TYPE_UV, 1, BRW_EXECUTE_8, false },
};
- for (unsigned i = 0; i < sizeof(move) / sizeof(move[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(move); i++) {
/* UV type is Gen6+ */
if (devinfo.gen < 6 &&
move[i].src_type == BRW_REGISTER_TYPE_UV)
{ BRW_REGISTER_TYPE_B, BRW_REGISTER_TYPE_UV, BRW_HORIZONTAL_STRIDE_2, true },
};
- for (unsigned i = 0; i < sizeof(move) / sizeof(move[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(move); i++) {
/* UV type is Gen6+ */
if (devinfo.gen < 6 &&
move[i].src_type == BRW_REGISTER_TYPE_UV)
if (devinfo.gen >= 12)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
if (!devinfo.has_64bit_types &&
(type_sz(inst[i].dst_type) == 8 || type_sz(inst[i].src_type) == 8))
continue;
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
if (!devinfo.has_64bit_types &&
(type_sz(inst[i].dst_type) == 8 || type_sz(inst[i].src_type) == 8))
continue;
if (devinfo.gen < 8)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
if (!devinfo.has_64bit_types &&
(type_sz(inst[i].dst_type) == 8 || type_sz(inst[i].src_type) == 8))
continue;
brw_set_default_access_mode(p, BRW_ALIGN_16);
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
if (inst[i].opcode == BRW_OPCODE_MOV) {
brw_MOV(p, retype(g0, inst[i].dst_type),
retype(g0, inst[i].src_type));
if (devinfo.gen >= 12)
return;
- for (unsigned i = 0; i < sizeof(inst) / sizeof(inst[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(inst); i++) {
if (!devinfo.has_64bit_types &&
(type_sz(inst[i].dst_type) == 8 || type_sz(inst[i].src_type) == 8))
continue;