From: Marta Lofstedt <marta.lofst...@intel.com> According to GLES 3.1 CTS test: ES31-CTS.texture_storage_multisample. APIGLTexStorage2DMultisample. multisample_texture_tex_storage_2d_ invalid_and_border_case_texture_sizes.
Textures of size 0x0 are not allowed for GL_TEXTURE_2D_MULTISAMPLE. Signed-off-by: Marta Lofstedt <marta.lofst...@linux.intel.com> --- src/mesa/main/teximage.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 3d85615..c76ad54 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1483,6 +1483,13 @@ _mesa_legal_texture_dimensions(struct gl_context *ctx, GLenum target, if (height > 0 && !_mesa_is_pow_two(height - 2 * border)) return GL_FALSE; } + /* + * according to GLES 3.1 CTS it is not OK with + * zero size multisampled textures + */ + if (width == 0 && height == 0 && GL_TEXTURE_2D_MULTISAMPLE == target) + return GL_FALSE; + return GL_TRUE; case GL_TEXTURE_3D: -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev