aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-22 09:17:57 +0100
committermarha <marha@users.sourceforge.net>2012-02-22 09:17:57 +0100
commit6baac61e6ca9cd314e689dfe7f84771aad08c66e (patch)
tree2a8a059fc83d3f7acc1034071ed3a9f7ff3c0027 /mesalib/src/mesa/state_tracker/st_gen_mipmap.c
parent0ae7710db53515dab4a35c33ba9a030bbfc2ac5b (diff)
downloadvcxsrv-6baac61e6ca9cd314e689dfe7f84771aad08c66e.tar.gz
vcxsrv-6baac61e6ca9cd314e689dfe7f84771aad08c66e.tar.bz2
vcxsrv-6baac61e6ca9cd314e689dfe7f84771aad08c66e.zip
fontconfig libX11 libxcb mesa pixman xserver git update 22 Feb 2012
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_gen_mipmap.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_gen_mipmap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
index d817a9c2b..d3496642f 100644
--- a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
@@ -75,10 +75,9 @@ st_render_mipmap(struct st_context *st,
{
struct pipe_context *pipe = st->pipe;
struct pipe_screen *screen = pipe->screen;
- struct pipe_sampler_view *psv = st_get_texture_sampler_view(stObj, pipe);
+ struct pipe_sampler_view *psv;
const uint face = _mesa_tex_target_to_face(target);
- assert(psv->texture == stObj->pt);
#if 0
assert(target != GL_TEXTURE_3D); /* implemented but untested */
#endif
@@ -86,11 +85,14 @@ st_render_mipmap(struct st_context *st,
/* check if we can render in the texture's format */
/* XXX should probably kill this and always use util_gen_mipmap
since this implements a sw fallback as well */
- if (!screen->is_format_supported(screen, psv->format, psv->texture->target,
+ if (!screen->is_format_supported(screen, stObj->pt->format,
+ stObj->pt->target,
0, PIPE_BIND_RENDER_TARGET)) {
return FALSE;
}
+ psv = st_create_texture_sampler_view(pipe, stObj->pt);
+
/* Disable conditional rendering. */
if (st->render_condition) {
pipe->render_condition(pipe, NULL, 0);
@@ -103,6 +105,8 @@ st_render_mipmap(struct st_context *st,
pipe->render_condition(pipe, st->render_condition, st->condition_mode);
}
+ pipe_sampler_view_reference(&psv, NULL);
+
return TRUE;
}