diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-08-05 16:07:19 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-08-05 16:07:19 -0600 |
commit | 54a7115fc27c640e2b3f1a362e8e07aac220556d (patch) | |
tree | e0e03f538901077152e9171ae5747e438aaea83b /src/mesa/state_tracker/st_cb_texture.c | |
parent | 42b6b067ac68ac1309d0570613bea4a88f745559 (diff) |
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 <olvaffe@gmail.com>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |