st/mesa: fix incorrect buffer token passed to _mesa_BindFramebuffer()
authorBrian Paul <brianp@vmware.com>
Tue, 12 Jan 2016 01:22:50 +0000 (18:22 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 13 Jan 2016 15:01:56 +0000 (08:01 -0700)
I added this code right at the end, and got it wrong.
Only used by the WGL_ARB_render_texture code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/mesa/state_tracker/st_copytex.c

index d246d8b6a713e550cfe56caf09b8c72e702352cb..4e0fd790d43a23af5bbcbdf794f4654a9f1d9831 100644 (file)
@@ -59,7 +59,7 @@ st_copy_framebuffer_to_texture(GLenum srcBuffer,
    _mesa_GetIntegerv(GL_READ_BUFFER, &readBufSave);
 
    /* Read from the winsys buffer */
-   _mesa_BindFramebuffer(GL_READ_BUFFER, 0);
+   _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, 0);
    _mesa_ReadBuffer(srcBuffer);
 
    /* copy image from pbuffer to texture */
@@ -136,5 +136,5 @@ st_copy_framebuffer_to_texture(GLenum srcBuffer,
 
    /* restore readbuffer */
    _mesa_ReadBuffer(readBufSave);
-   _mesa_BindFramebuffer(GL_READ_BUFFER, readFBOSave);
+   _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, readFBOSave);
 }