Commit 02a9d011 by Peng Huang Committed by Commit Bot

Revert "Fix two issues with GLES2 devices"

This reverts commit c0ed204d. Reason for revert: crbug.com/1186140 Original change's description: > Fix two issues with GLES2 devices > > * make sure maxColorAttachments is greater than 0 > * Do not sync read buffer if maxDrawBuffers is 0 > > Bug: chromium:1167731 > Change-Id: Icd0fb5e65ec6ffdc0d6f6325ccd1207958922254 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2733268 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Peng Huang <penghuang@chromium.org> Bug: chromium:1167731 Change-Id: Ibd05424889feac0bdb7293426ab41eb1f4753b35 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743662 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Peng Huang <penghuang@chromium.org>
parent f34a788b
...@@ -707,10 +707,7 @@ Framebuffer::Framebuffer(const Caps &caps, ...@@ -707,10 +707,7 @@ Framebuffer::Framebuffer(const Caps &caps,
{ {
mDirtyColorAttachmentBindings.emplace_back(this, DIRTY_BIT_COLOR_ATTACHMENT_0 + colorIndex); mDirtyColorAttachmentBindings.emplace_back(this, DIRTY_BIT_COLOR_ATTACHMENT_0 + colorIndex);
} }
if (caps.maxDrawBuffers > 1) mDirtyBits.set(DIRTY_BIT_READ_BUFFER);
{
mDirtyBits.set(DIRTY_BIT_READ_BUFFER);
}
} }
Framebuffer::Framebuffer(const Context *context, egl::Surface *surface, egl::Surface *readSurface) Framebuffer::Framebuffer(const Context *context, egl::Surface *surface, egl::Surface *readSurface)
......
...@@ -660,16 +660,11 @@ void GenerateCaps(const FunctionsGL *functions, ...@@ -660,16 +660,11 @@ void GenerateCaps(const FunctionsGL *functions,
if (functions->isAtLeastGL(gl::Version(3, 0)) || if (functions->isAtLeastGL(gl::Version(3, 0)) ||
functions->hasGLExtension("GL_EXT_framebuffer_object") || functions->hasGLExtension("GL_EXT_framebuffer_object") ||
functions->isAtLeastGLES(gl::Version(3, 0))) functions->isAtLeastGLES(gl::Version(2, 0)))
{ {
caps->maxRenderbufferSize = QuerySingleGLInt(functions, GL_MAX_RENDERBUFFER_SIZE); caps->maxRenderbufferSize = QuerySingleGLInt(functions, GL_MAX_RENDERBUFFER_SIZE);
caps->maxColorAttachments = QuerySingleGLInt(functions, GL_MAX_COLOR_ATTACHMENTS); caps->maxColorAttachments = QuerySingleGLInt(functions, GL_MAX_COLOR_ATTACHMENTS);
} }
else if (functions->isAtLeastGLES(gl::Version(2, 0)))
{
caps->maxRenderbufferSize = QuerySingleGLInt(functions, GL_MAX_RENDERBUFFER_SIZE);
caps->maxColorAttachments = 1;
}
else else
{ {
// Can't support ES2 without framebuffers and renderbuffers // Can't support ES2 without framebuffers and renderbuffers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment