Mesa (7.9): st/mesa: Unreference the sampler view in st_bind_surface.
Chia-I Wu
olv at kemper.freedesktop.org
Sat Nov 20 08:09:05 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 5105e3d4154da6511f8c034b8a90b90b3766a294
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5105e3d4154da6511f8c034b8a90b90b3766a294
Author: Chia-I Wu <olv at lunarg.com>
Date: Sun Oct 31 01:13:27 2010 +0800
st/mesa: Unreference the sampler view in st_bind_surface.
Without this, update_textures may not pick up the new pipe_resource.
It is actually update_textures that should check
stObj->sampler_view->texture != stObj->pt, but let's follow st_TexImage
and others for now.
(cherry picked from commit cfc81d93f7b07a89437cbbce173fc468070e06da)
---
src/mesa/state_tracker/st_cb_eglimage.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c
index 3145416..c54baf4 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -129,6 +129,7 @@ st_bind_surface(GLcontext *ctx, GLenum target,
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_resource_reference(&stObj->pt, ps->texture);
+ pipe_sampler_view_reference(&stObj->sampler_view, NULL);
pipe_resource_reference(&stImage->pt, stObj->pt);
stObj->width0 = ps->width;
More information about the mesa-commit
mailing list