mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 19:00:13 +01:00
mesa: Don't allow snorm internal formats in glCopyTexImage*() in GLES3
Fixes few failures in gles3 Khronos CTS test: packed_pixels
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
(cherry picked from commit 2d362a6aee)
This commit is contained in:
parent
b6fe3e7ac2
commit
4c02b3d90e
1 changed files with 11 additions and 0 deletions
|
|
@ -2667,6 +2667,17 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
|
|||
"glCopyTexImage%dD(srgb usage mismatch)", dimensions);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
/* Page 139, Table 3.15 of OpenGL ES 3.0 spec does not define ReadPixels
|
||||
* types for SNORM formats. Also, conversion to SNORM formats is not
|
||||
* allowed by Table 3.2 on Page 110.
|
||||
*/
|
||||
if(_mesa_is_enum_format_snorm(internalFormat)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCopyTexImage%dD(internalFormat=%s)", dimensions,
|
||||
_mesa_lookup_enum_by_nr(internalFormat));
|
||||
return GL_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_mesa_source_buffer_exists(ctx, baseFormat)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue