aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_sampler.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c3
2 files changed, 5 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) */
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) */