diff options
author | Juha-Pekka Heikkila <[email protected]> | 2014-04-09 12:08:12 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-04-16 22:46:45 -0700 |
commit | 30c35d1dcb2fde19b1c968751fda5151b795d257 (patch) | |
tree | b26c860db01ed9fc18abccbaabf08a77bfd0d92a /src/mesa/drivers/dri/i965/brw_vec4.cpp | |
parent | 6541f1b4d02b52e19c95dcfb07ef5e0e81a57955 (diff) |
i965: Add is_accumulator() function.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 480a3097b42..8aa746d3630 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -151,6 +151,15 @@ src_reg::src_reg(dst_reg reg) swizzles[2], swizzles[3]); } +bool +src_reg::is_accumulator() const +{ + return file == HW_REG && + fixed_hw_reg.file == BRW_ARCHITECTURE_REGISTER_FILE && + fixed_hw_reg.nr == BRW_ARF_ACCUMULATOR; +} + + void dst_reg::init() { @@ -221,6 +230,14 @@ dst_reg::is_null() const } bool +dst_reg::is_accumulator() const +{ + return file == HW_REG && + fixed_hw_reg.file == BRW_ARCHITECTURE_REGISTER_FILE && + fixed_hw_reg.nr == BRW_ARF_ACCUMULATOR; +} + +bool vec4_instruction::is_send_from_grf() { switch (opcode) { |