diff options
author | Connor Abbott <[email protected]> | 2015-08-11 14:23:57 -0700 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-05-10 11:25:07 +0200 |
commit | fccd15524f4c5b863e2e6570c66dbf1c15fee404 (patch) | |
tree | fdaa85ee450f17c3ef87ab50fc92a7fb22cba1a4 | |
parent | 6b6d68ae0786e456faa828a7eaf76c981c44b1cb (diff) |
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 <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_builder.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_builder.h b/src/mesa/drivers/dri/i965/brw_fs_builder.h index 9a3cc3a50c2..268ecc6f4ac 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_builder.h +++ b/src/mesa/drivers/dri/i965/brw_fs_builder.h @@ -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; } |