[Mesa-dev] [PATCH 2/5] st/mesa: use private pipe_sampler_view in decompress_with_blit()
Brian Paul
brianp at vmware.com
Mon Feb 13 16:10:06 PST 2012
Similar to the previous commit.
---
src/mesa/state_tracker/st_cb_texture.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index c2011da..b0f6b14 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -609,8 +609,7 @@ decompress_with_blit(struct gl_context * ctx,
struct pipe_context *pipe = st->pipe;
struct st_texture_image *stImage = st_texture_image(texImage);
struct st_texture_object *stObj = st_texture_object(texImage->TexObject);
- struct pipe_sampler_view *src_view =
- st_get_texture_sampler_view(stObj, pipe);
+ struct pipe_sampler_view *src_view;
const GLuint width = texImage->Width;
const GLuint height = texImage->Height;
struct pipe_surface *dst_surface;
@@ -632,6 +631,8 @@ decompress_with_blit(struct gl_context * ctx,
pipe->render_condition(pipe, NULL, 0);
}
+ src_view = st_create_texture_sampler_view(pipe, stObj->pt);
+
/* Choose the source mipmap level */
src_view->u.tex.first_level = src_view->u.tex.last_level = texImage->Level;
@@ -702,6 +703,8 @@ decompress_with_blit(struct gl_context * ctx,
/* destroy the temp / dest surface */
util_destroy_rgba_surface(dst_texture, dst_surface);
+
+ pipe_sampler_view_reference(&src_view, NULL);
}
--
1.7.3.4
More information about the mesa-dev
mailing list