aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_eu_emit.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-08-29 21:10:32 -0700
committerMatt Turner <[email protected]>2014-09-29 15:59:19 -0700
commit66ab9c22fecc053f099376c7b20958e0ffdf05ca (patch)
tree8de9a800a981ed46d456f523432b8a550bd8a469 /src/mesa/drivers/dri/i965/brw_eu_emit.c
parenta0df258f8961d25caab7c4d1ccae3402f998f454 (diff)
i965: Use BRW_MATH_DATA_SCALAR when source regioning is scalar.
Notice the mistaken (but harmless) argument swapping in brw_math_invert(). Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_eu_emit.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 15e1da7a686..e4488fc8ead 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -1879,11 +1879,18 @@ void gen4_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);