mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 00:30:19 +01:00
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 <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
658a63e5d9
commit
5e310e9f83
2 changed files with 3 additions and 0 deletions
|
|
@ -2011,6 +2011,7 @@ struct gl_fragment_program
|
|||
{
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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...
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue