st/mesa: don't do sRGB conversion in CopyTexSubImage
authorMarek Olšák <maraeo@gmail.com>
Thu, 14 Feb 2013 11:48:12 +0000 (12:48 +0100)
committerMarek Olšák <maraeo@gmail.com>
Mon, 18 Feb 2013 16:57:41 +0000 (17:57 +0100)
Assuming I understand EXT_texture_sRGB correctly.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_texture.c

index b376f23142a39fc0bad25cd27c292d7fcda89f1f..d2dccb41186b818425db12e6d12bd8e5874164ef 100644 (file)
@@ -1418,8 +1418,8 @@ st_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
    assert(strb->surface);
    assert(stImage->pt);
 
-   src_format = strb->surface->format;
-   dest_format = stImage->pt->format;
+   src_format = util_format_linear(strb->surface->format);
+   dest_format = util_format_linear(stImage->pt->format);
 
    if (do_flip) {
       srcY1 = strb->Base.Height - srcY - height;