Mesa (master): intel: Make a renderbuffer wrapping a texture have the same _BaseFormat.

Eric Anholt anholt at kemper.freedesktop.org
Fri Jan 27 20:07:28 UTC 2012


Module: Mesa
Branch: master
Commit: 7cac88679bb600f35694e91859c4682c04c32f7a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7cac88679bb600f35694e91859c4682c04c32f7a

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Jan 19 17:41:39 2012 -0800

intel: Make a renderbuffer wrapping a texture have the same _BaseFormat.

Otherwise, when you asked for the _BaseFormat of an rb wrapping a
GL_RGB texture, you got GL_RGBA because that's what we were storing
the texture data as.

NOTE: This is a candidate for the 8.0 branch.

---

 src/mesa/drivers/dri/intel/intel_fbo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 9630344..f4a25a1 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -475,7 +475,7 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel,
 
    rb->Format = image->TexFormat;
    rb->InternalFormat = image->InternalFormat;
-   rb->_BaseFormat = _mesa_get_format_base_format(rb->Format);
+   rb->_BaseFormat = image->_BaseFormat;
    rb->Width = mt->level[level].width;
    rb->Height = mt->level[level].height;
 




More information about the mesa-commit mailing list