On 09/26/2011 06:08 PM, Eric Anholt wrote: > On Mon, 26 Sep 2011 16:51:34 -0700, Kenneth Graunke <kenn...@whitecape.org> > wrote: >> Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> >> >> --- >> src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 14 ++++++++++---- >> 1 files changed, 10 insertions(+), 4 deletions(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp >> b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp >> index 8176a76..b35d558 100644 >> --- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp >> +++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp >> @@ -151,7 +151,10 @@ fs_visitor::generate_math1_gen6(fs_inst *inst, >> >> assert(inst->mlen == 0); >> >> - brw_set_compression_control(p, BRW_COMPRESSION_NONE); >> + bool force_simd8 = intel->gen < 7 || dst.type != BRW_REGISTER_TYPE_F; >> + >> + if (force_simd8) >> + brw_set_compression_control(p, BRW_COMPRESSION_NONE); > > I'm not following why force simd8 for dst.type != BRW_REGISTER_TYPE_F.
Ah, I neglected to add a comment about that. >From the instruction set reference: "INT DIV function does not support SIMD16." This does seem odd, but it -is- the only integer operation, so it's plausible. Still, I wonder this restriction is just for the variant that returns the quotient in dst and remainder in dst + 1...since +1 isn't what you want in SIMD16 mode. I suppose I'll have to try it and find out... > Also, it looks like we could drop the math workaround stuff for the VS > on IVB? Huh. You're right, the docs no longer mandate align1 mode. I threw together a proof of concept patch and test which produced: math pow(8) g5<1>.xyF g2<0,4,1>.yxxxF g1.4<0,4,1>.yxxxF {align16 WE_normal 1Q }; Correct results. Yay! align16 works. The docs are still missing the dot in the "Cond Mod" and "Src Mod" boxes, so I'd expect it to still ignore abs and negate. But I decided to try it anyway, and hacked up a patch & test that produced: math sin(8) g5<1>F -g2<0,4,1>.wzyxF {align16 WE_normal 1Q}; This works too! Apparently they just forgot to update the docs...my "extra source of documentation" indicates source and conditional modifiers should work just fine now. At any rate, I suppose I'll rip out a bunch of stuff and respin. :D _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev