[Mesa-dev] [PATCH 12/17] intel: Make a renderbuffer wrapping a texture have the same _BaseFormat.

Eric Anholt eric at anholt.net
Fri Jan 20 15:39:24 PST 2012


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 b3c631f..5f8c336 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -486,7 +486,7 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel,
    rb->Format = image->TexFormat;
    rb->InternalFormat = image->InternalFormat;
    rb->DataType = intel_mesa_format_to_rb_datatype(rb->Format);
-   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;
 
-- 
1.7.7.3



More information about the mesa-dev mailing list