OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 6 Mar 2019 11:45:25 +0000 (11:45 +0000)
commit41d78f9ed7ebbdd8bd10268635e9bc883a8ffc33
tree626c6d80cd4106283b8ee6d8186fe1d454f75872
parentbfb5bdaa97272537567cdf1e6caf1c7db9f28aba
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>
(cherry picked from commit 367b0ede4d9115aba772d6e46ec73642761f7ff6)
[Emil: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_fs_nir.cpp