summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/teximage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 4dff27567e0..127e9bf5693 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1954,10 +1954,12 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
}
/* Make sure the requested image format is compatible with the
- * texture's format.
+ * texture's format. We let the colorformat-indexformat go through,
+ * because the texelfetcher will dequantize to full rgba.
*/
if (is_color_format(format)
- && !is_color_format(texImage->TexFormat->BaseFormat)) {
+ && !is_color_format(texImage->TexFormat->BaseFormat)
+ && !is_index_format(texImage->TexFormat->BaseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
return;
}