diff options
author | Jordan Justen <[email protected]> | 2015-02-02 14:23:35 -0800 |
---|---|---|
committer | Connor Abbott <[email protected]> | 2015-07-17 10:10:48 -0700 |
commit | c4a2217e79ac78c59cec3eb97542ceb819f92a44 (patch) | |
tree | ba346dedf55d245226f2151bda64bf7811bb46d9 /src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | |
parent | 9f344b908a95440d215f29c0b05b8ea8dba2839e (diff) |
i965/fs: Mark last used ip for all regs read in the payload
If a source register in the push constant registers uses more than one
register, then we wouldn't update payload_last_use_ip for subsequent
registers.
Unlike most uniform data pushed into registers, the CS gl_LocalInvocationID
data varies per execution channel. Therefore for SIMD16 mode, we have vec16
data in the payload. In this case we then need to mark 2 registers in
payload_last_use_ip as last used by the instruction. There's a similar
situation for the z and w coordinates of gl_FragCoord for fragment shaders,
where it had only happened to work before because of some bogus interferences
which the next commit removes.
(Connor: added bit about gl_FragCoord to commit message)
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 8e5621d3cb5..620fc235c1b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -380,7 +380,10 @@ fs_visitor::setup_payload_interference(struct ra_graph *g, if (node_nr >= payload_node_count) continue; - payload_last_use_ip[node_nr] = use_ip; + for (int j = 0; j < inst->regs_read(i); j++) { + payload_last_use_ip[node_nr + j] = use_ip; + assert(node_nr + j < payload_node_count); + } } } |