diff options
author | Matt Turner <[email protected]> | 2014-03-24 16:18:58 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-06-17 09:38:06 -0700 |
commit | 856860db4a62bbe1cbcf63c68ce921b608ffae01 (patch) | |
tree | 5270212bc9e2feb4bb02af2204a2bff456015c00 /src | |
parent | 15b6ab04e2bef02f009eb305707b7b4fe4e5a7dd (diff) |
i965/fs: Apply cube map array fixup and restore the payload.
So that we don't have partial writes to a large VGRF. Will be cleaned up
by register coalescing.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 4d58cc6ef59..6352739e794 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -1739,7 +1739,20 @@ fs_visitor::visit(ir_texture *ir) type->sampler_array) { fs_reg depth = dst; depth.reg_offset = 2; - emit_math(SHADER_OPCODE_INT_QUOTIENT, depth, depth, fs_reg(6)); + fs_reg fixed_depth = fs_reg(this, glsl_type::int_type); + emit_math(SHADER_OPCODE_INT_QUOTIENT, fixed_depth, depth, fs_reg(6)); + + fs_reg *fixed_payload = ralloc_array(mem_ctx, fs_reg, inst->regs_written); + fs_reg d = dst; + for (int i = 0; i < inst->regs_written; i++) { + if (i == 2) { + fixed_payload[i] = fixed_depth; + } else { + d.reg_offset = i; + fixed_payload[i] = d; + } + } + emit(LOAD_PAYLOAD(dst, fixed_payload, inst->regs_written)); } } |