mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
allow GetTexImage with RGBA format and COLOR_INDEX internalformat
This commit is contained in:
parent
7af80ca8c1
commit
3cc28c96cd
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue