aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_fragprog.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-28 13:55:41 +0100
committermarha <marha@users.sourceforge.net>2012-01-28 13:55:41 +0100
commit1aee8dafb5391e093f3a111f906ab0d8b6775510 (patch)
tree3fd4cc1783510fb6ce17c4c42b4d012014008e5b /mesalib/src/mesa/swrast/s_fragprog.c
parentc6a1477b0092762299491d79b3a8cb094c6456da (diff)
downloadvcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.tar.gz
vcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.tar.bz2
vcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.zip
mesa xserver git update 28 jan 2012
Diffstat (limited to 'mesalib/src/mesa/swrast/s_fragprog.c')
-rw-r--r--mesalib/src/mesa/swrast/s_fragprog.c12
1 files changed, 12 insertions, 0 deletions
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'