зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
cb0bc43305
Коммит
50e8c44daf
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче