X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Ftexgetimage.c;h=da610798e1232822da5eb0d6e7416731bc68197e;hb=751fe9058bc15f4f8608f0fdc02209542991ff23;hp=c94f88e16e68e8f7a81447d2b01b47f5f1cf6931;hpb=896a08bde6de96bbd737d70386dd3cea270be4c4;p=mesa.git diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index c94f88e16e6..da610798e12 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -35,6 +35,8 @@ #include "context.h" #include "formats.h" #include "image.h" +#include "mfeatures.h" +#include "mtypes.h" #include "pack.h" #include "texgetimage.h" #include "teximage.h" @@ -432,11 +434,21 @@ get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixel type == GL_UNSIGNED_BYTE) { memCopy = GL_TRUE; } + else if (texImage->TexFormat == MESA_FORMAT_L16 && + format == GL_LUMINANCE && + type == GL_UNSIGNED_SHORT) { + memCopy = GL_TRUE; + } else if (texImage->TexFormat == MESA_FORMAT_A8 && format == GL_ALPHA && type == GL_UNSIGNED_BYTE) { memCopy = GL_TRUE; } + else if (texImage->TexFormat == MESA_FORMAT_A16 && + format == GL_ALPHA && + type == GL_UNSIGNED_SHORT) { + memCopy = GL_TRUE; + } } if (memCopy) {