diff options
Diffstat (limited to 'src/mesa/swrast/s_fragprog.c')
-rw-r--r-- | src/mesa/swrast/s_fragprog.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 1caa0ebc226..cd20d8e3647 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -30,6 +30,18 @@ #include "s_fragprog.h" #include "s_span.h" +/** + * \brief Should swrast use a fragment program? + * + * \return true if the current fragment program exists and is not the fixed + * function fragment program + */ +GLboolean +_swrast_use_fragment_program(struct gl_context *ctx) +{ + struct gl_fragment_program *fp = ctx->FragmentProgram._Current; + return fp && fp != ctx->FragmentProgram._TexEnvProgram; +} /** * Apply texture object's swizzle (X/Y/Z/W/0/1) to incoming 'texel' |