[Mesa-dev] [PATCH 1/5] st/mesa: use private pipe_sampler_view in st_render_mipmap()
Brian Paul
brianp at vmware.com
Mon Feb 13 16:10:05 PST 2012
Rather than the one in st_texture_object. This sampler view really has
no connection to the one used for rendering.
---
src/mesa/state_tracker/st_gen_mipmap.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index d817a9c..8179b5b 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -75,7 +75,7 @@ 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);
@@ -91,6 +91,8 @@ st_render_mipmap(struct st_context *st,
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;
}
--
1.7.3.4
More information about the mesa-dev
mailing list