diff options
author | Kenneth Graunke <[email protected]> | 2011-03-15 23:53:40 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-05-17 23:33:01 -0700 |
commit | 64ce592679a5b08d66e3cbbf964f9e695e14aee1 (patch) | |
tree | 4095b655707a857cf8ee3e2d505e9a8c8a965b70 /src/mesa/drivers/dri/i965/brw_fs.cpp | |
parent | ff6e3c73f6553cd29b915497b5b00e3ef158a27d (diff) |
i965: Add support for IF/ELSE/ENDIF control flow on Ivybridge.
Ivybridge's IF instruction doesn't support conditional modifiers.
It also introduces UIP, which must point to the ENDIF instruction.
ELSE and ENDIF remain the same except that JIP moves from dst to src1.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 30e771aea4e..8dee849edd4 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1873,7 +1873,7 @@ fs_visitor::visit(ir_if *ir) */ this->base_ir = ir->condition; - if (intel->gen >= 6) { + if (intel->gen == 6) { emit_if_gen6(ir); } else { emit_bool_to_cond_code(ir->condition); @@ -3890,7 +3890,8 @@ fs_visitor::generate_code() case BRW_OPCODE_IF: if (inst->src[0].file != BAD_FILE) { - assert(intel->gen >= 6); + /* The instruction has an embedded compare (only allowed on gen6) */ + assert(intel->gen == 6); gen6_IF(p, inst->conditional_mod, src[0], src[1]); } else { brw_IF(p, BRW_EXECUTE_8); |