summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 50ce82811c..7b84a86ba4 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -208,15 +208,11 @@ update_samplers(struct st_context *st)
assert(sampler->min_lod <= sampler->max_lod);
}
- xlate_border_color(texobj->BorderColor,
- teximg ? teximg->TexFormat->BaseFormat : GL_RGBA,
+ xlate_border_color(texobj->BorderColor.f,
+ teximg ? teximg->_BaseFormat : GL_RGBA,
sampler->border_color);
sampler->max_anisotropy = texobj->MaxAnisotropy;
- if (sampler->max_anisotropy > 1.0) {
- sampler->min_img_filter = PIPE_TEX_FILTER_ANISO;
- sampler->mag_img_filter = PIPE_TEX_FILTER_ANISO;
- }
/* only care about ARB_shadow, not SGI shadow */
if (texobj->CompareMode == GL_COMPARE_R_TO_TEXTURE) {
@@ -229,14 +225,23 @@ update_samplers(struct st_context *st)
/*printf("%s su=%u non-null\n", __FUNCTION__, su);*/
cso_single_sampler(st->cso_context, su, sampler);
+ if (su < st->ctx->Const.MaxVertexTextureImageUnits) {
+ cso_single_vertex_sampler(st->cso_context, su, sampler);
+ }
}
else {
/*printf("%s su=%u null\n", __FUNCTION__, su);*/
cso_single_sampler(st->cso_context, su, NULL);
+ if (su < st->ctx->Const.MaxVertexTextureImageUnits) {
+ cso_single_vertex_sampler(st->cso_context, su, NULL);
+ }
}
}
cso_single_sampler_done(st->cso_context);
+ if (st->ctx->Const.MaxVertexTextureImageUnits > 0) {
+ cso_single_vertex_sampler_done(st->cso_context);
+ }
}