aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_atom_sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_sampler.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
index ad159c64d..8845fed51 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
@@ -201,6 +201,8 @@ update_vertex_samplers(struct st_context *st)
struct gl_vertex_program *vprog = ctx->VertexProgram._Current;
GLuint su;
+ if (st->state.num_vertex_samplers == 0 && vprog->Base.SamplersUsed == 0)
+ return;
st->state.num_vertex_samplers = 0;
/* loop over sampler units (aka tex image units) */