aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_atom_texture.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-14 08:39:30 +0000
committermarha <marha@users.sourceforge.net>2011-04-14 08:39:30 +0000
commit898081f31f99dc35a1602a607a07d1aaff49ac40 (patch)
treeb2adbc0fd699cc5dc2af141df26130e7874f9369 /mesalib/src/mesa/state_tracker/st_atom_texture.c
parentc1e91b66cbcf91645f65b9d63f115dcb5a441406 (diff)
parent019fc27ce6dc2a1809107be10d4deb80e0fa436b (diff)
downloadvcxsrv-898081f31f99dc35a1602a607a07d1aaff49ac40.tar.gz
vcxsrv-898081f31f99dc35a1602a607a07d1aaff49ac40.tar.bz2
vcxsrv-898081f31f99dc35a1602a607a07d1aaff49ac40.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index 532e9b5a3..4277a24b0 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -251,13 +251,15 @@ update_textures(struct st_context *st)
st->state.num_textures = su + 1;
/* if sampler view has changed dereference it */
- if (stObj->sampler_view)
+ if (stObj->sampler_view) {
if (check_sampler_swizzle(stObj->sampler_view,
stObj->base._Swizzle,
samp->DepthMode) ||
(st_view_format != stObj->sampler_view->format) ||
- stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level)
+ stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) {
pipe_sampler_view_reference(&stObj->sampler_view, NULL);
+ }
+ }
sampler_view = st_get_texture_sampler_view_from_stobj(stObj, pipe,
samp,
@@ -269,10 +271,12 @@ update_textures(struct st_context *st)
cso_set_fragment_sampler_views(st->cso_context,
st->state.num_textures,
st->state.sampler_views);
+
if (st->ctx->Const.MaxVertexTextureImageUnits > 0) {
+ GLuint numUnits = MIN2(st->state.num_textures,
+ st->ctx->Const.MaxVertexTextureImageUnits);
cso_set_vertex_sampler_views(st->cso_context,
- MIN2(st->state.num_textures,
- st->ctx->Const.MaxVertexTextureImageUnits),
+ numUnits,
st->state.sampler_views);
}
}