intel: Use _mesa_base_tex_format for FBO texture attachments.
authorEric Anholt <eric@anholt.net>
Sat, 16 Apr 2011 03:28:51 +0000 (20:28 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 18 Apr 2011 18:19:53 +0000 (11:19 -0700)
The _mesa_base_fbo_format variant doesn't handle some texture
internalformats, such as "3".

Fixes:
fbo-blending-formats.
fbo-alphatest-formats
EXT_texture_sRGB/fbo-alphatest-formats

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/intel/intel_fbo.c

index 8b57eb19f562fb9b11837cfb2519b091fc127d32..ad2468a3237e048eeb8f369dca2dbb809c6e1d41 100644 (file)
@@ -385,7 +385,7 @@ intel_update_wrapper(struct gl_context *ctx, struct intel_renderbuffer *irb,
    irb->Base.Format = texImage->TexFormat;
    irb->Base.DataType = intel_mesa_format_to_rb_datatype(texImage->TexFormat);
    irb->Base.InternalFormat = texImage->InternalFormat;
-   irb->Base._BaseFormat = _mesa_base_fbo_format(ctx, irb->Base.InternalFormat);
+   irb->Base._BaseFormat = _mesa_base_tex_format(ctx, irb->Base.InternalFormat);
    irb->Base.Width = texImage->Width;
    irb->Base.Height = texImage->Height;