Mesa (10.6): i965: Respect stride and subreg_offset for ATTR registers
Emil Velikov
evelikov at kemper.freedesktop.org
Thu Oct 1 09:28:56 UTC 2015
Module: Mesa
Branch: 10.6
Commit: 5b6ac61231902ea5b9948bc0770e6c40c007a5c5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b6ac61231902ea5b9948bc0770e6c40c007a5c5
Author: Kristian Høgsberg Kristensen <krh at bitplanet.net>
Date: Wed Sep 23 16:57:47 2015 -0700
i965: Respect stride and subreg_offset for ATTR registers
When we assign hw regs to attributes, we don't incorporate the stride
and subreg_offset from the fs_reg. It's rarely used, but the integer
multiplication lowering uses unusual stride and subreg_offset
combination breaks when one source is an attribute.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91970
Cc: "10.6 11.0" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Kristian Høgsberg Kristensen <krh at bitplanet.net>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
(cherry picked from commit 2ea16966ae66d4dd5c5dcb996d7996d9c734bbee)
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index bbf9c23..ae49ade 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1942,7 +1942,10 @@ fs_visitor::assign_vs_urb_setup()
inst->src[i].file = HW_REG;
inst->src[i].fixed_hw_reg =
- retype(brw_vec8_grf(grf, 0), inst->src[i].type);
+ stride(byte_offset(retype(brw_vec8_grf(grf, 0), inst->src[i].type),
+ inst->src[i].subreg_offset),
+ inst->exec_size * inst->src[i].stride,
+ inst->exec_size, inst->src[i].stride);
}
}
}
More information about the mesa-commit
mailing list