mesa: fix texstore with GL_COLOR_INDEX data
This got broken by 3dbf5bf657.
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>
This commit is contained in:
@@ -1495,6 +1495,9 @@ texstore_swizzle(TEXSTORE_PARAMS)
|
||||
if (!is_array)
|
||||
return GL_FALSE;
|
||||
|
||||
if (srcFormat == GL_COLOR_INDEX)
|
||||
return GL_FALSE;
|
||||
|
||||
switch (srcType) {
|
||||
case GL_FLOAT:
|
||||
case GL_UNSIGNED_BYTE:
|
||||
|
||||
Reference in New Issue
Block a user