i965: Avoid unnecessary recompiles for shaders that don't use dFdy().
authorPaul Berry <stereotype441@gmail.com>
Wed, 20 Jun 2012 20:40:45 +0000 (13:40 -0700)
committerPaul Berry <stereotype441@gmail.com>
Thu, 19 Jul 2012 17:02:25 +0000 (10:02 -0700)
commitd08fdacd58dfa6b1926e9df4707dd9e8dd5370c5
tree1dec2faf115441417fa7a0188f5dd51335bf9fad
parentce1d2f08f9d08bd5d49b2072a94b3d85e3169fb5
i965: Avoid unnecessary recompiles for shaders that don't use dFdy().

The i965 back-end needs to compile dFdy() differently for FBOs and
window system framebuffers, because Y coordinates are flipped between
the two (see commit 82d2596: i965: Compute dFdy() correctly for FBOs).
This patch avoids unnecessarily recompiling shaders that don't use
dFdy(), by only setting render_to_fbo in the wm program key if the
shader actually uses dFdy().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs_emit.cpp
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/i965/brw_wm_emit.c