Notice the mistaken (but harmless) argument swapping in brw_math_invert().
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
unsigned function,
unsigned msg_reg_nr,
struct brw_reg src,
- unsigned data_type,
unsigned precision );
void gen6_math(struct brw_compile *p,
unsigned function,
unsigned msg_reg_nr,
struct brw_reg src,
- unsigned data_type,
unsigned precision )
{
struct brw_context *brw = p->brw;
brw_inst *insn = next_insn(p, BRW_OPCODE_SEND);
+ unsigned data_type;
+ if (src.vstride == BRW_VERTICAL_STRIDE_0 &&
+ src.width == BRW_WIDTH_1 &&
+ src.hstride == BRW_HORIZONTAL_STRIDE_0) {
+ data_type = BRW_MATH_DATA_SCALAR;
+ } else {
+ data_type = BRW_MATH_DATA_VECTOR;
+ }
assert(brw->gen < 6);
BRW_MATH_FUNCTION_INV,
0,
src,
- BRW_MATH_PRECISION_FULL,
- BRW_MATH_DATA_VECTOR );
+ BRW_MATH_PRECISION_FULL);
}
gen4_math(p, dst,
op,
inst->base_mrf, src,
- BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
if (dispatch_width == 16) {
gen4_math(p, sechalf(dst),
op,
inst->base_mrf + 1, sechalf(src),
- BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
brw_set_default_compression_control(p, BRW_COMPRESSION_COMPRESSED);
gen4_math(p, dst,
op,
inst->base_mrf, src,
- BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
}
BRW_MATH_FUNCTION_INV,
0,
c->det,
- BRW_MATH_DATA_SCALAR,
BRW_MATH_PRECISION_FULL);
}
BRW_MATH_FUNCTION_INV,
0,
c->dx0,
- BRW_MATH_DATA_SCALAR,
BRW_MATH_PRECISION_FULL);
brw_set_default_access_mode(p, BRW_ALIGN_16);
brw_math_function(inst->opcode),
inst->base_mrf,
src,
- BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
}
brw_math_function(inst->opcode),
inst->base_mrf,
op0,
- BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
}