summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_texture.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2010-03-12 14:37:36 +0100
committerMichal Krol <michal@vmware.com>2010-03-12 14:38:23 +0100
commitb8030c6561e019e079b5be2fe64ec804df4bfa03 (patch)
treee3bfe141407636ac9942fc3b890dc03ae5ef0ae4 /src/mesa/state_tracker/st_cb_texture.c
parent08f89988c8738029c60e89c61c9da0522bd53087 (diff)
st/mesa: Associate a sampler view with an st texture object.
Lazily create a sampler view when the texture is being bound for the first time.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index c849132e74..76846560f9 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -123,6 +123,8 @@ st_DeleteTextureObject(GLcontext *ctx,
struct st_texture_object *stObj = st_texture_object(texObj);
if (stObj->pt)
pipe_texture_reference(&stObj->pt, NULL);
+ if (stObj->sampler_view)
+ pipe_sampler_view_reference(&stObj->sampler_view, NULL);
_mesa_delete_texture_object(ctx, texObj);
}
@@ -312,6 +314,8 @@ guess_and_alloc_texture(struct st_context *st,
depth,
usage);
+ stObj->pipe = st->pipe;
+
DBG("%s - success\n", __FUNCTION__);
}