intel/fs: Bail in optimize_extract_to_float if we have modifiers
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 12 Feb 2019 04:39:45 +0000 (22:39 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 15 Feb 2019 05:02:44 +0000 (23:02 -0600)
commit367b0ede4d9115aba772d6e46ec73642761f7ff6
tree56542cc9ebd310beba43d4febb217253df1fe579
parent8c859367df95b74e7596f7fefffbdbf08bb8f8c7
intel/fs: Bail in optimize_extract_to_float if we have modifiers

This fixes a bug in runscape where we were optimizing x >> 16 to an
extract and then negating and converting to float.  The NIR to fs pass
was dropping the negate on the floor breaking a geometry shader and
causing it to render nothing.

Fixes: 1f862e923cb "i965/fs: Optimize float conversions of byte/word..."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109601
Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/intel/compiler/brw_fs_nir.cpp