diff options
author | marha <marha@users.sourceforge.net> | 2013-02-05 08:28:03 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-02-05 08:28:03 +0100 |
commit | f6023b333a7fec1691bfb2757ba7615a15196a81 (patch) | |
tree | 17e7b1b021478ef2c470bf8202f144be04c4fea8 /mesalib/src/mesa/main/teximage.c | |
parent | e4326f248054c0276b6e9136cd48e782e42c2644 (diff) | |
parent | 76c527be60066b647468ad66f8e4d7dd18fa1769 (diff) | |
download | vcxsrv-f6023b333a7fec1691bfb2757ba7615a15196a81.tar.gz vcxsrv-f6023b333a7fec1691bfb2757ba7615a15196a81.tar.bz2 vcxsrv-f6023b333a7fec1691bfb2757ba7615a15196a81.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig mesa xkeyboard-config git update 5 feb 2013
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index f03e84ad8..ff3c92c5e 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -3004,8 +3004,18 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims, texObj = _mesa_get_current_tex_object(ctx, target); assert(texObj); - texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, - internalFormat, format, type); + if (compressed) { + /* For glCompressedTexImage() the driver has no choice about the + * texture format since we'll never transcode the user's compressed + * image data. The internalFormat was error checked earlier. + */ + texFormat = _mesa_glenum_to_compressed_format(internalFormat); + } + else { + texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, + internalFormat, format, type); + } + assert(texFormat != MESA_FORMAT_NONE); /* check that width, height, depth are legal for the mipmap level */ |