From 54a7115fc27c640e2b3f1a362e8e07aac220556d Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 5 Aug 2009 16:07:19 -0600 Subject: mesa/st: Add support for binding pipe surface to texture. This commit adds functions to bind a pipe surface to a texture. This allows texturing directly from the surface. Signed-off-by: Chia-I Wu --- src/mesa/state_tracker/st_cb_texture.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa/state_tracker/st_cb_texture.c') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index e8d7f70ad6..90a059ca69 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -523,6 +523,12 @@ st_TexImage(GLcontext * ctx, DBG("%s target %s level %d %dx%dx%d border %d\n", __FUNCTION__, _mesa_lookup_enum_by_nr(target), level, width, height, depth, border); + /* switch to "normal" */ + if (stObj->surface_based) { + _mesa_clear_texture_object(ctx, texObj); + stObj->surface_based = GL_FALSE; + } + /* gallium does not support texture borders, strip it off */ if (border) { strip_texture_border(border, &width, &height, &depth, unpack, &unpackNB); -- cgit v1.2.3