diff options
author | Paul Berry <[email protected]> | 2012-06-20 12:31:46 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-07-19 10:02:01 -0700 |
commit | 5e310e9f8300a357d6bdaf098c72098518b564f3 (patch) | |
tree | a5401bf29409a10e66a9548899ab2487446e67e3 /src/mesa/program | |
parent | 658a63e5d9777e4cf67e0a72848944bc11533cf8 (diff) |
mesa: Add UsesDFdy to struct gl_fragment_program.
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 <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/program.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 23138eae85b..15337f4d8aa 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -546,6 +546,7 @@ _mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog) 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; } @@ -767,6 +768,7 @@ _mesa_combine_programs(struct gl_context *ctx, 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... |