It seems under some GPU/profile, GL_INVALID_ENUM is generated instead of GL_INVALID_VALUE for unsupported internal format. This is even conflicted in reference documents. Just handle them at same time. From: https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml GL_INVALID_ENUM is generated if internalFormat is not one of the accepted resolution and format symbolic constants. From: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml GL_INVALID_VALUE is generated if internalFormat is not one of the accepted resolution and format symbolic constants. Signed-off-by: Lepton Wu <lepton@chromium.org> Reviewed-by: Dave Airlie <airlied@redhat.com>macos/master
parent
01d02cee1b
commit
fd0ed16337
Loading…
Reference in new issue