diff options
author | Ben Widawsky <[email protected]> | 2014-12-22 19:29:22 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-01-20 15:24:40 -0800 |
commit | 169d7e5cb1cce73d39e40717d5f49ac30b626d1b (patch) | |
tree | 64654288b10ae81aa4230fa41b86cccf0a808902 /src/mesa/drivers/dri/i965/brw_eu_emit.c | |
parent | 9394f5838364e3265b8f7ee87f3265848317e955 (diff) |
i965: Extract scalar region checking logic
There are currently 2 users of this functionality. I have 2 more users coming
up, and having a simple function makes the results much cleaner. The existing
interface semantics was proposed by Matt.
v2 (Ken): Rename to region_matches()/has_scalar_region().
Signed-off-by: Ben Widawsky <[email protected]>
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.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 8f15db9f728..c26bed2dee3 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1893,9 +1893,7 @@ void gen4_math(struct brw_compile *p, 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) { + if (has_scalar_region(src)) { data_type = BRW_MATH_DATA_SCALAR; } else { data_type = BRW_MATH_DATA_VECTOR; |