Commit 5b028d18 by Geoff Lang

Add a special case for binding to GL_FRAMEBUFFER for state tracking.

Binding to GL_FRAMEBUFFER is supposed to set the read and draw framebuffer bindings instead of being a separate binding point. BUG=angleproject:885 Change-Id: Ic6d9056a2f8bfa472587c5ed030c15fcc93574c7 Reviewed-on: https://chromium-review.googlesource.com/267460Reviewed-by: 's avatarBrandon Jones <bajones@chromium.org> Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 0d31828f
......@@ -155,10 +155,23 @@ void StateManagerGL::setPixelUnpackState(GLint alignment, GLint rowLength)
void StateManagerGL::bindFramebuffer(GLenum type, GLuint framebuffer)
{
if (mFramebuffers[type] != framebuffer)
if (type == GL_FRAMEBUFFER)
{
mFramebuffers[type] = framebuffer;
mFunctions->bindFramebuffer(type, framebuffer);
if (mFramebuffers[GL_READ_FRAMEBUFFER] != framebuffer ||
mFramebuffers[GL_DRAW_FRAMEBUFFER] != framebuffer)
{
mFramebuffers[GL_READ_FRAMEBUFFER] = framebuffer;
mFramebuffers[GL_DRAW_FRAMEBUFFER] = framebuffer;
mFunctions->bindFramebuffer(GL_FRAMEBUFFER, framebuffer);
}
}
else
{
if (mFramebuffers[type] != framebuffer)
{
mFramebuffers[type] = framebuffer;
mFunctions->bindFramebuffer(type, framebuffer);
}
}
}
......
#include "ANGLETest.h"
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
ANGLE_TYPED_TEST_CASE(ClearTest, ES2_D3D9, ES2_D3D11, ES3_D3D11);
ANGLE_TYPED_TEST_CASE(ClearTest, ES2_D3D9, ES2_D3D11, ES3_D3D11, ES2_OPENGL, ES3_OPENGL);
ANGLE_TYPED_TEST_CASE(ClearTestES3, ES3_D3D11);
template<typename T>
......
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