diff options
author | Matt Turner <[email protected]> | 2014-08-29 21:10:32 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-09-29 15:59:19 -0700 |
commit | 66ab9c22fecc053f099376c7b20958e0ffdf05ca (patch) | |
tree | 8de9a800a981ed46d456f523432b8a550bd8a469 | |
parent | a0df258f8961d25caab7c4d1ccae3402f998f454 (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]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 9 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_util.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_sf_emit.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 2 |
6 files changed, 9 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index e6c26e39225..db40497751a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -291,7 +291,6 @@ void gen4_math(struct brw_compile *p, unsigned function, unsigned msg_reg_nr, struct brw_reg src, - unsigned data_type, unsigned precision ); void gen6_math(struct brw_compile *p, 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); diff --git a/src/mesa/drivers/dri/i965/brw_eu_util.c b/src/mesa/drivers/dri/i965/brw_eu_util.c index 0950fad99fd..af4cfafcd6d 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_util.c +++ b/src/mesa/drivers/dri/i965/brw_eu_util.c @@ -44,8 +44,7 @@ void brw_math_invert( struct brw_compile *p, BRW_MATH_FUNCTION_INV, 0, src, - BRW_MATH_PRECISION_FULL, - BRW_MATH_DATA_VECTOR ); + BRW_MATH_PRECISION_FULL); } diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 1bc10f5614b..e523df557f6 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -342,7 +342,6 @@ fs_generator::generate_math_gen4(fs_inst *inst, gen4_math(p, dst, op, inst->base_mrf, src, - BRW_MATH_DATA_VECTOR, BRW_MATH_PRECISION_FULL); if (dispatch_width == 16) { @@ -350,7 +349,6 @@ fs_generator::generate_math_gen4(fs_inst *inst, 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); @@ -376,7 +374,6 @@ fs_generator::generate_math_g45(fs_inst *inst, gen4_math(p, dst, op, inst->base_mrf, src, - BRW_MATH_DATA_VECTOR, BRW_MATH_PRECISION_FULL); } diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c index 04d21a8f4e9..e8bf7163e26 100644 --- a/src/mesa/drivers/dri/i965/brw_sf_emit.c +++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c @@ -327,7 +327,6 @@ static void invert_det( struct brw_sf_compile *c) BRW_MATH_FUNCTION_INV, 0, c->det, - BRW_MATH_DATA_SCALAR, BRW_MATH_PRECISION_FULL); } @@ -616,7 +615,6 @@ void brw_emit_point_sprite_setup(struct brw_sf_compile *c, bool allocate) BRW_MATH_FUNCTION_INV, 0, c->dx0, - BRW_MATH_DATA_SCALAR, BRW_MATH_PRECISION_FULL); brw_set_default_access_mode(p, BRW_ALIGN_16); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp index 88695381045..e5225673812 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp @@ -157,7 +157,6 @@ vec4_generator::generate_math1_gen4(vec4_instruction *inst, brw_math_function(inst->opcode), inst->base_mrf, src, - BRW_MATH_DATA_VECTOR, BRW_MATH_PRECISION_FULL); } @@ -218,7 +217,6 @@ vec4_generator::generate_math2_gen4(vec4_instruction *inst, brw_math_function(inst->opcode), inst->base_mrf, op0, - BRW_MATH_DATA_VECTOR, BRW_MATH_PRECISION_FULL); } |