OSDN Git Service

mesa: do more teximage error checking for generic compressed formats
authorBrian Paul <brianp@vmware.com>
Tue, 1 May 2012 20:46:04 +0000 (14:46 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 4 May 2012 14:07:58 +0000 (08:07 -0600)
commita36581ccc06693231011c3fe136207e73191b1ce
treec27f42ee5acce9b27ad91008551f693f85edcc98
parent5cc4b4aaf43d038a2788522613f283e5f4b9182d
mesa: do more teximage error checking for generic compressed formats

When glTexImage or glCopyTexImage is called with internalFormat being a
generic compressed format (like GL_COMPRESSED_RGB) we need to do the same
error checks as for specific compressed formats.  In particular, check if
the texture target is compatible with the format.  None of the texture
compression formats we support so far work with GL_TEXTURE_1D, for example.

See also https://bugs.freedesktop.org/show_bug.cgi?id=49124

NOTE: This is a candidate for the 8.0 branch.
src/mesa/main/teximage.c