Mesa (broadwell): i965: Fix math instruction hstride assertions on Broadwell.
Kenneth Graunke
kwg at kemper.freedesktop.org
Sat Feb 1 01:12:11 UTC 2014
Module: Mesa
Branch: broadwell
Commit: bf988f569adcee405a8594f20dc266a4590862f0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf988f569adcee405a8594f20dc266a4590862f0
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Thu Jan 30 17:50:02 2014 -0800
i965: Fix math instruction hstride assertions on Broadwell.
In the final revision of my gen8_generator patch, I updated the MATH
instruction's assertion from (dst.hstride == 1) to check that source and
destination hstride matched. Unfortunately, I didn't test this enough,
and many Piglit tests fail this test.
The documentation indicates that "scalar source is also supported",
which we believe means <0,1,0> access mode (hstride == 0). If hstride
is non-zero, then it must match the destination register.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/mesa/drivers/dri/i965/gen8_generator.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/gen8_generator.cpp b/src/mesa/drivers/dri/i965/gen8_generator.cpp
index ee5f792..1e2ac09 100644
--- a/src/mesa/drivers/dri/i965/gen8_generator.cpp
+++ b/src/mesa/drivers/dri/i965/gen8_generator.cpp
@@ -299,7 +299,7 @@ gen8_generator::math(unsigned math_function,
{
gen8_instruction *inst = next_inst(BRW_OPCODE_MATH);
- assert(dst.hstride == src0.hstride);
+ assert(src0.hstride == 0 || src0.hstride == dst.hstride);
gen8_set_math_function(inst, math_function);
gen8_set_dst(brw, inst, dst);
More information about the mesa-commit
mailing list