KhronosGroup/WebGL

Specify copyTexImage errors

lexaknyazev opened this issue · 2 comments

The OpenGL ES 3.0 spec does not precisely define error codes for unsupported source/target combinations. The updated ES 3.2 suggests generating INVALID_OPERATION for not guaranteed conversions and INVALID_ENUM if "an invalid value is specified for internalformat".

On top of that, ES 3.0 ref page provides a list of allowed internal formats with INVALID_ENUM error for others, while dEQP seems to expect INVALID_OPERATION.

The immediate issue is ANGLE returning INVALID_OPERATION for SNORM target formats while conformance2/textures/misc/copy-texture-image.html expects INVALID_ENUM.

My understanding of the ref pages, if they don't match the spec they're wrong. This is often the case. There's still the issue you're mentioning but you can remove the ref pages as a source of data

CTS supports requiring one-of [gl.INVALID_ENUM, gl.INVALID_OPERATION], and it's probably not worth it to worry about what's most correct for error codes.
Technically, I think this should be INVALID_ENUM, because the SNORM enums are never valid for CopyTexImage but I think it's not worth trying to fix except in the CTS.