mesa: fix texstore with GL_COLOR_INDEX data
authorRoland Scheidegger <sroland@vmware.com>
Wed, 13 Aug 2014 17:30:48 +0000 (19:30 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 14 Aug 2014 00:16:23 +0000 (02:16 +0200)
commitb6d29de2c443df2aa670a70545d2e1e68ef57f45
tree37d4d9c3675cb71886c47fdea26d9d29ee462f23
parent64c379a3a8e397bf949705efecfc745ec4d7a843
mesa: fix texstore with GL_COLOR_INDEX data

This got broken by 3dbf5bf6571e0c9d3e4febce01dea82be190d9d2.
GL_COLOR_INDEX data is still supported (in legacy contexts), but the new
texstore_swizzle path cannot handle it (and didn't detect this).
Unfortunately there's no piglit test trying to specify textures with a
GL_COLOR_INDEX source format, and I don't really understand how all the color
map stuff which is used by this works, but this caused conform failures
(with a reported mesa implementation error when trying to figure out the color
mapping).

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/main/texstore.c