intel/fs: Don't copy-propagate stride=0 sources into ddx/ddy
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 2 Sep 2020 15:13:16 +0000 (10:13 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 2 Sep 2020 20:31:32 +0000 (20:31 +0000)
commit8e8701b43a0fc1997ecdb6a9557dd3e2c1a0d398
tree128d48d4254da7aeba32cf369aa8191bc06b226f
parent95415a54c007a909f0fb9d1b2567beecbd73d403
intel/fs: Don't copy-propagate stride=0 sources into ddx/ddy

This can come up if, for instance, the shader does a derivative of a
uniform or flat input.  Ideally, NIR would use divergence analysis to
get rid of the derivative in this case but it doesn't right now.  This
fixes a crash in F1 2017.

Cc: mesa-stable@lists.freedesktop.org
Reported-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6564>
src/intel/compiler/brw_fs_copy_propagation.cpp