From 1aee8dafb5391e093f3a111f906ab0d8b6775510 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 28 Jan 2012 13:55:41 +0100 Subject: mesa xserver git update 28 jan 2012 --- mesalib/src/mesa/swrast/s_fragprog.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mesalib/src/mesa/swrast/s_fragprog.c') diff --git a/mesalib/src/mesa/swrast/s_fragprog.c b/mesalib/src/mesa/swrast/s_fragprog.c index 1caa0ebc2..cd20d8e36 100644 --- a/mesalib/src/mesa/swrast/s_fragprog.c +++ b/mesalib/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' -- cgit v1.2.3