From c30d5eefc96925b4bef781806c7a0114eca1b8e0 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 26 Jun 2014 09:30:29 +0200 Subject: Opdated to openssl-1.0.1h xkeyboard-config fontconfig libX11 libxcb xcb-proto mesa xserver git update 26 June 2014 xserver commit a3b44ad8db1fa2f3b81c1ff9498f31c5323edd37 libxcb commit 125135452a554e89e49448e2c1ee6658324e1095 libxcb/xcb-proto commit 84bfd909bc3774a459b11614cfebeaa584a1eb38 xkeyboard-config commit 39a226707b133ab5540c2d30176cb3857e74dcca libX11 commit a4679baaa18142576d42d423afe816447f08336c fontconfig commit 274f2181f294af2eff3e8db106ec8d7bab2d3ff1 mesa commit 9a8acafa47558cafeb37f80f4b30061ac1962c69 --- mesalib/src/mesa/state_tracker/st_atom_texture.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'mesalib/src/mesa/state_tracker/st_atom_texture.c') diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c index e2d26ee24..2e10bc3e2 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_texture.c +++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c @@ -212,6 +212,12 @@ check_sampler_swizzle(const struct st_texture_object *stObj, } +static unsigned last_level(struct st_texture_object *stObj) +{ + return MIN2(stObj->base._MaxLevel, stObj->pt->last_level); +} + + static struct pipe_sampler_view * st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe, struct st_texture_object *stObj, @@ -244,6 +250,8 @@ st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe, templ.u.buf.last_element = f + (n - 1); } else { templ.u.tex.first_level = stObj->base.BaseLevel; + templ.u.tex.last_level = last_level(stObj); + assert(templ.u.tex.first_level <= templ.u.tex.last_level); } if (swizzle != SWIZZLE_NOOP) { @@ -279,7 +287,8 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st, if (*sv) { if (check_sampler_swizzle(stObj, *sv) || (format != (*sv)->format) || - stObj->base.BaseLevel != (*sv)->u.tex.first_level) { + stObj->base.BaseLevel != (*sv)->u.tex.first_level || + last_level(stObj) != (*sv)->u.tex.last_level) { pipe_sampler_view_reference(sv, NULL); } } @@ -434,7 +443,7 @@ update_geometry_textures(struct st_context *st) update_textures(st, PIPE_SHADER_GEOMETRY, &ctx->GeometryProgram._Current->Base, - ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits, + ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits, st->state.sampler_views[PIPE_SHADER_GEOMETRY], &st->state.num_sampler_views[PIPE_SHADER_GEOMETRY]); } -- cgit v1.2.3