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 boolean will allow it to avoid unnecessarily recompiling shaders
that don't use dFdy().
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
{
struct gl_program Base; /**< base class */
GLboolean UsesKill; /**< shader uses KIL instruction */
+ GLboolean UsesDFdy; /**< shader uses DDY instruction */
GLboolean OriginUpperLeft;
GLboolean PixelCenterInteger;
enum gl_frag_depth_layout FragDepthLayout;
const struct gl_fragment_program *fp = gl_fragment_program_const(prog);
struct gl_fragment_program *fpc = gl_fragment_program(clone);
fpc->UsesKill = fp->UsesKill;
+ fpc->UsesDFdy = fp->UsesDFdy;
fpc->OriginUpperLeft = fp->OriginUpperLeft;
fpc->PixelCenterInteger = fp->PixelCenterInteger;
}
newFprog = gl_fragment_program(newProg);
newFprog->UsesKill = fprogA->UsesKill || fprogB->UsesKill;
+ newFprog->UsesDFdy = fprogA->UsesDFdy || fprogB->UsesDFdy;
/* We'll do a search and replace for instances
* of progB_colorFile/progB_colorIndex below...