[Mesa-dev] [PATCH 42/59] i965/fs: fix regs_written in LOAD_PAYLOAD for doubles
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Fri Apr 29 11:29:39 UTC 2016
From: Connor Abbott <connor.w.abbott at intel.com>
v2: Account for the stride of the dst (Iago)
Signed-off-by: Iago Toral Quiroga <itoral at igalia.com>
---
src/mesa/drivers/dri/i965/brw_fs_builder.h | 8 ++++++--
1 file 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 9a3cc3a..268ecc6 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;
}
--
2.5.0
More information about the mesa-dev
mailing list