summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>2011-09-29 14:51:41 +0100
committerBrian Paul <brianp@vmware.com>2011-09-29 13:46:48 -0600
commitc6f9d80ad2d11b44c38098cd0ae2eb91d31b86d9 (patch)
tree917b6dd9bc5389f7f37b67c7dc1ba1c81dbe0a1e /src
parente7843273fae516fa9922f12053bb6c063b39921c (diff)
downloadexternal_mesa3d-c6f9d80ad2d11b44c38098cd0ae2eb91d31b86d9.zip
external_mesa3d-c6f9d80ad2d11b44c38098cd0ae2eb91d31b86d9.tar.gz
external_mesa3d-c6f9d80ad2d11b44c38098cd0ae2eb91d31b86d9.tar.bz2
gallium: Set renderbuffer's InternalFormat when rendering to texture
When an FBO is rendering to a texture (rather than a renderbuffer), Gallium sets up an internal renderbuffer to handle the rendering, and copies over enough texture state to make this work. InternalFormat was missed out, causing glTexCopyImage to take a slow path unnecessarily. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41263 Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 05139ec..4d32158 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -381,6 +381,7 @@ st_render_texture(struct gl_context *ctx,
rb->Width = texImage->Width2;
rb->Height = texImage->Height2;
rb->_BaseFormat = texImage->_BaseFormat;
+ rb->InternalFormat = texImage->InternalFormat;
/*printf("***** render to texture level %d: %d x %d\n", att->TextureLevel, rb->Width, rb->Height);*/
/*printf("***** pipe texture %d x %d\n", pt->width0, pt->height0);*/