Revert "mesa: set reasonable defaults in update_wrapper"
authorMarek Olšák <maraeo@gmail.com>
Sat, 14 May 2011 02:38:36 +0000 (04:38 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 16 May 2011 22:13:43 +0000 (00:13 +0200)
This reverts commit 1d5f16ff8fae936f2e920800b169cf7736a8052a.

It breaks fbo-readpixels on swrast.
For some reason, swrast likes GL_RGBA and CHAN_TYPE.

src/mesa/main/texrender.c

index 8ba78b8b477c855355ce49b15e849e485c1a2434..a7641a5f9a49b69f66e0af5953cfdf093c6cab26 100644 (file)
@@ -530,7 +530,6 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
 {
    struct texture_renderbuffer *trb
       = (struct texture_renderbuffer *) att->Renderbuffer;
-   GLuint unused;
 
    (void) ctx;
    ASSERT(trb);
@@ -603,10 +602,8 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
       trb->Base._BaseFormat = GL_RGBA;
       break;
    default:
-      _mesa_format_to_type_and_comps(trb->TexImage->TexFormat,
-                                     &trb->Base.DataType, &unused);
-      trb->Base._BaseFormat =
-         _mesa_base_fbo_format(ctx, trb->TexImage->InternalFormat);
+      trb->Base.DataType = CHAN_TYPE;
+      trb->Base._BaseFormat = GL_RGBA;
    }
    trb->Base.Data = trb->TexImage->Data;
 }