aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_atom_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index 88e6128c8..d241527cc 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -260,6 +260,9 @@ update_vertex_textures(struct st_context *st)
struct gl_vertex_program *vprog = ctx->VertexProgram._Current;
GLuint su;
+ if (!vprog->Base.SamplersUsed && st->state.num_vertex_textures == 0)
+ return;
+
st->state.num_vertex_textures = 0;
/* loop over sampler units (aka tex image units) */