i965/fs: fix regs_written in LOAD_PAYLOAD for doubles

v2: Account for the stride of the dst (Iago)

Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Connor Abbott
2015-08-11 14:23:57 -07:00
committed by Samuel Iglesias Gonsálvez
parent 6b6d68ae07
commit fccd15524f
+6 -2
View File
@@ -557,8 +557,12 @@ namespace brw {
{
instruction *inst = emit(SHADER_OPCODE_LOAD_PAYLOAD, dst, src, sources);
inst->header_size = header_size;
inst->regs_written = header_size +
(sources - header_size) * (dispatch_width() / 8);
inst->regs_written = header_size;
for (unsigned i = header_size; i < sources; i++) {
inst->regs_written +=
DIV_ROUND_UP(dispatch_width() * type_sz(src[i].type) *
dst.stride, REG_SIZE);
}
return inst;
}