summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_eglimage.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-05-05 11:32:33 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-05 11:58:04 +0800
commit719f7049bb2c7f5ca886055c9cd15b2805bd8e97 (patch)
treeb3860900e8a59d6e50bb98edb2b4849bb182eeef /src/mesa/state_tracker/st_cb_eglimage.c
parenta6ec153830ea25958f8cb5f5b5ae7a3433d61bbc (diff)
st/mesa: Fix texture-from-pixmap.
Remember the size of the level=0 mipmap image. Do not call util_format_get_component_bits when st_context_teximage is called to release a texture image.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_eglimage.c')
-rw-r--r--src/mesa/state_tracker/st_cb_eglimage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c
index 0fa1848e23..00861a6ff3 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -129,6 +129,10 @@ st_bind_surface(GLcontext *ctx, GLenum target,
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_resource_reference(&stImage->pt, ps->texture);
+ stObj->width0 = ps->width;
+ stObj->height0 = ps->height;
+ stObj->depth0 = 1;
+
_mesa_dirty_texobj(ctx, texObj, GL_TRUE);
}