Correctly handle some invalid enums in TexParameterf
GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES is a "get"-only enum, so even though it may be accepted by the texture_paramter validator (which has both "set" and "get" enums, as they are mostly the same), we need to handle it in Texture::SetParameter* and return GL_INVALID_ENUM. Some enums (e.g. GL_TEXTURE_SRGB_DECODE_EXT) were only handled in Texture::SetParameteri, so rework this a bit so that SetParameterf always delegates everything (including error cases) to SetParameteri, except for float params (which are only a handful), to avoid most of the duplication. Bug: 877754 Change-Id: I15c52f81e62544f90a15b914113c5c4816530cdb Reviewed-on: https://chromium-review.googlesource.com/c/1343357Reviewed-by:Zhenyao Mo <zmo@chromium.org> Commit-Queue: Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#609492}
Showing
Please register or sign in to comment