aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/ffvertex_prog.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/ffvertex_prog.c')
-rw-r--r--mesalib/src/mesa/main/ffvertex_prog.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/ffvertex_prog.c b/mesalib/src/mesa/main/ffvertex_prog.c
index ba94a3877..92fec09ba 100644
--- a/mesalib/src/mesa/main/ffvertex_prog.c
+++ b/mesalib/src/mesa/main/ffvertex_prog.c
@@ -38,12 +38,12 @@
#include "main/macros.h"
#include "main/enums.h"
#include "main/ffvertex_prog.h"
-#include "shader/program.h"
-#include "shader/prog_cache.h"
-#include "shader/prog_instruction.h"
-#include "shader/prog_parameter.h"
-#include "shader/prog_print.h"
-#include "shader/prog_statevars.h"
+#include "program/program.h"
+#include "program/prog_cache.h"
+#include "program/prog_instruction.h"
+#include "program/prog_parameter.h"
+#include "program/prog_print.h"
+#include "program/prog_statevars.h"
/** Max of number of lights and texture coord units */
@@ -75,6 +75,7 @@ struct state_key {
unsigned light_attenuated:1;
unsigned texunit_really_enabled:1;
unsigned texmat_enabled:1;
+ unsigned coord_replace:1;
unsigned texgen_enabled:4;
unsigned texgen_mode0:4;
unsigned texgen_mode1:4;
@@ -225,6 +226,10 @@ static void make_state_key( GLcontext *ctx, struct state_key *key )
if (texUnit->_ReallyEnabled)
key->unit[i].texunit_really_enabled = 1;
+ if (ctx->Point.PointSprite)
+ if (ctx->Point.CoordReplace[i])
+ key->unit[i].coord_replace = 1;
+
if (ctx->Texture._TexMatEnabled & ENABLE_TEXMAT(i))
key->unit[i].texmat_enabled = 1;
@@ -1385,6 +1390,9 @@ static void build_texture_transform( struct tnl_program *p )
if (!(p->state->fragprog_inputs_read & FRAG_BIT_TEX(i)))
continue;
+ if (p->state->unit[i].coord_replace)
+ continue;
+
if (p->state->unit[i].texgen_enabled ||
p->state->unit[i].texmat_enabled) {