intel: Use _mesa_base_tex_format for FBO texture attachments.

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>
(cherry picked from commit cd3568c329)
This commit is contained in:
Eric Anholt 2011-04-15 20:28:51 -07:00 committed by Ian Romanick
parent e78908d152
commit d264ed0b48

View file

@ -458,7 +458,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;