diff options
author | Eric Anholt <[email protected]> | 2010-10-26 10:31:08 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-10-26 10:34:14 -0700 |
commit | 0e8c834ffa2f6d943a927e1a32a273d2f8600694 (patch) | |
tree | 6f1fbc8cb7b4f95cea026eea9945f475590b0578 /src/mesa | |
parent | 1732a8bc72fe0a8eaf7449eda65eba1a017ae909 (diff) |
i965: Clear some undefined fields of g0 when using them for gen6 FB writes.
This doesn't appear to help any testcases I'm looking at, but it looks
like it's required.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index c687fde8738..fc30ffc6744 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1961,6 +1961,20 @@ fs_visitor::generate_fb_write(fs_inst *inst) brw_MOV(p, brw_message_reg(inst->base_mrf), brw_vec8_grf(0, 0)); + + if (inst->target > 0) { + /* Set the render target index for choosing BLEND_STATE. */ + brw_MOV(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 0, 2), + BRW_REGISTER_TYPE_UD), + brw_imm_ud(inst->target)); + } + + /* Clear viewport index, render target array index. */ + brw_AND(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 0, 0), + BRW_REGISTER_TYPE_UD), + retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UD), + brw_imm_ud(0xf7ff)); + implied_header = brw_null_reg(); } else { implied_header = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW); |