i965: Enable faster workaround-free math on Ivybridge.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 18 Oct 2011 19:24:47 +0000 (12:24 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 7 Nov 2011 19:03:22 +0000 (11:03 -0800)
commita73c65c5342bf41fa0dfefe7daa9197ce6a11db4
tree4c36495f87e4f8ecbf930b17bb9ab4f050a807ad
parent97534d92e27d633be89447c0b22145bbce287789
i965: Enable faster workaround-free math on Ivybridge.

According to the documentation, Ivybridge's math instruction works in
SIMD16 mode for the fragment shader, and no longer forbids align16 mode
for the vertex shader.

The documentation claims that SIMD16 mode isn't supported for INT DIV,
but empirical evidence shows that it works fine.  Presumably the note
is trying to warn us that the variant that returns both quotient and
remainder in (dst, dst + 1) doesn't work in SIMD16 mode since dst + 1
would be sechalf(dst), trashing half your results.  Since we don't use
that variant, we don't care and can just enable SIMD16 everywhere.

The documentation also still claims that source modifiers and
conditional modifiers aren't supported, but empirical evidence and
study of the simulator both show that they work just fine.

Goodbye workarounds.  Math just works now.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_emit.cpp
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_emit.cpp