Don't enable GL_FRAMEBUFFER_SRGB on OpenGL ES.

This enum value is not supported, but the functionality is implied.
Silences a GL error from ANGLE.

Change-Id: Ib3eb242c53d548f7b9648f7037c3178705cbaecd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38800
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White 2021-01-28 15:21:15 +00:00 committed by Commit Bot service account
parent dc25c98727
commit 44fef9a928
1 changed files with 3 additions and 1 deletions

View File

@ -167,9 +167,11 @@ namespace dawn_native { namespace opengl {
mFunctions.Enable(GL_SCISSOR_TEST);
mFunctions.Enable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
if (mFunctions.GetVersion().IsDesktop()) {
// These are not necessary on GLES. The functionality is enabled by default, and
// works by specifying sample counts and SRGB textures, respectively.
mFunctions.Enable(GL_MULTISAMPLE);
}
mFunctions.Enable(GL_FRAMEBUFFER_SRGB);
}
mFunctions.Enable(GL_SAMPLE_MASK);
mPCIInfo.name = reinterpret_cast<const char*>(mFunctions.GetString(GL_RENDERER));