Bug 1225576. Always use the VAO workaround. r=jgilbert

I'd like to unconditionally use this work around for now. This bug affects the
current version of ANGLE and older versions of Mesa (not just llvmpipe like we
were checking for). Once ANGLE is fixed we can consider disabling this on
Windows again.

FWIW, Chrome does something like this unconditionally.
This commit is contained in:
Jeff Muizelaar 2015-11-26 14:44:55 -05:00
Родитель cb0bc43305
Коммит 50e8c44daf
2 изменённых файлов: 2 добавлений и 14 удалений

Просмотреть файл

@ -12,9 +12,7 @@ namespace mozilla {
WebGLVertexArrayGL::WebGLVertexArrayGL(WebGLContext* webgl)
: WebGLVertexArray(webgl)
#if defined(XP_LINUX)
, mIsVAO(false)
#endif
{ }
WebGLVertexArrayGL::~WebGLVertexArrayGL()
@ -30,9 +28,7 @@ WebGLVertexArrayGL::DeleteImpl()
mContext->MakeContextCurrent();
mContext->gl->fDeleteVertexArrays(1, &mGLName);
#if defined(XP_LINUX)
mIsVAO = false;
#endif
}
void
@ -41,9 +37,7 @@ WebGLVertexArrayGL::BindVertexArrayImpl()
mContext->mBoundVertexArray = this;
mContext->gl->fBindVertexArray(mGLName);
#if defined(XP_LINUX)
mIsVAO = true;
#endif
}
void
@ -55,15 +49,11 @@ WebGLVertexArrayGL::GenVertexArray()
bool
WebGLVertexArrayGL::IsVertexArrayImpl()
{
#if defined(XP_LINUX)
gl::GLContext* gl = mContext->gl;
if (gl->WorkAroundDriverBugs() &&
gl->Vendor() == gl::GLVendor::VMware &&
gl->Renderer() == gl::GLRenderer::GalliumLlvmpipe)
if (gl->WorkAroundDriverBugs())
{
return mIsVAO;
}
#endif
mContext->MakeContextCurrent();
return mContext->gl->fIsVertexArray(mGLName) != 0;

Просмотреть файл

@ -25,13 +25,11 @@ protected:
explicit WebGLVertexArrayGL(WebGLContext* webgl);
~WebGLVertexArrayGL();
#if defined(XP_LINUX)
// Bug 1140459: Some drivers (including our test slaves!) don't
// give reasonable answers for IsRenderbuffer, maybe others.
// give reasonable answers for IsVertexArray, maybe others.
//
// So we track the `is a VAO` state ourselves.
bool mIsVAO;
#endif
};
} // namespace mozilla