Since .stride is 0 for a scalar write, we calculated regs_written = 0
for a mov(1) instruction. Instruction scheduling loops from 0 to
regs_written when calculating dependencies, so this would cause
problems.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp
b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 2046eba..3142ab4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -123,7 +123,7 @@ fs_inst::init(enum opcode opcode, uint8_t exec_size, const
fs_reg &dst,
case HW_REG:
case MRF:
case ATTR:
- this->regs_written = (dst.width * dst.stride * type_sz(dst.type) + 31) /
32;
+ this->regs_written = MAX2((dst.width * dst.stride * type_sz(dst.type) +
31) / 32, 1);
break;
case BAD_FILE:
this->regs_written = 0;
--
2.0.4
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev