[Mesa-dev] [PATCH 1/9] copyteximage: check that sRGB usage is valid for GLES3 / GL

Török Edwin edwin+ml-mesadev at etorok.net
Sun Feb 10 09:57:20 PST 2013


On 01/19/2013 01:55 AM, Matt Turner wrote:
> From: Jordan Justen <jordan.l.justen at intel.com>
> 
> Cc: Eric Anholt <eric at anholt.net>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>

FYI this broke lots of games under wine 1.5.20, with errors like:

err:d3d:check_fbo_compat >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from Post-pixelshader blending check @ utils.c / 1133
err:d3d:check_fbo_compat >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from Post-pixelshader blending check @ utils.c / 1133
err:d3d:check_fbo_compat >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from Post-pixelshader blending check @ utils.c / 1133

The failing line (in wine) is:
            gl_info->gl_ops.gl.p_glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 0, 0, 16, 16, 0);
            gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, readback);
            checkGLcall("Post-pixelshader blending check");

Apparently its trying to copy from a sRGB internal format:
9623 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_SRGB8_ALPHA8, width = 16, height = 16, border = 0, format = GL_BGRA, type = GL_UNSIGNED_INT_8_8_8_8_REV, pixels = NULL)

They seem to have fixed this in wine 1.5.23 (released Feb 1 2013) by removing the CopyTexImage2D, but probably all wine version between
1.3.32 and 1.5.22 are broken.
Perhaps in the next release notes for Mesa (that would include this commit) something should be said about having to upgrade wine?

Although this seems to be a new requirement in OpenGL core 4.3: OpenGL spec 4.2 and the "manpages" for glCopyTexImage2D
 don't say anything about INVALID_OPERATION and sRGB:
https://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml

Should the check done by your patch be restricted to OpenGL 4.3 contexts?

Best regards,
--Edwin


More information about the mesa-dev mailing list