Bug 1022205 - disable sync fence on AdrenoTM200 r=jgilbert

This commit is contained in:
Sotaro Ikeda 2014-06-24 08:59:59 -07:00
parent 3ad64bf9d6
commit 3feadaf7d6
3 changed files with 15 additions and 2 deletions

View File

@ -579,6 +579,7 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
const char *rendererMatchStrings[size_t(GLRenderer::Other)] = {
"Adreno 200",
"Adreno 205",
"Adreno (TM) 200",
"Adreno (TM) 205",
"Adreno (TM) 320",
"PowerVR SGX 530",

View File

@ -138,6 +138,7 @@ MOZ_END_ENUM_CLASS(GLVendor)
MOZ_BEGIN_ENUM_CLASS(GLRenderer)
Adreno200,
Adreno205,
AdrenoTM200,
AdrenoTM205,
AdrenoTM320,
SGX530,

View File

@ -169,10 +169,19 @@ SharedSurface_Gralloc::Fence()
mSync = 0;
}
bool disableSyncFence = false;
// Disable sync fence on AdrenoTM200.
// AdrenoTM200's sync fence does not work correctly. See Bug 1022205.
if (mGL->Renderer() == GLRenderer::AdrenoTM200) {
disableSyncFence = true;
}
// When Android native fences are available, try
// them first since they're more likely to work.
// Android native fences are also likely to perform better.
if (mEGL->IsExtensionSupported(GLLibraryEGL::ANDROID_native_fence_sync)) {
if (!disableSyncFence &&
mEGL->IsExtensionSupported(GLLibraryEGL::ANDROID_native_fence_sync))
{
mGL->MakeCurrent();
EGLSync sync = mEGL->fCreateSync(mEGL->Display(),
LOCAL_EGL_SYNC_NATIVE_FENCE_ANDROID,
@ -196,7 +205,9 @@ SharedSurface_Gralloc::Fence()
}
}
if (mEGL->IsExtensionSupported(GLLibraryEGL::KHR_fence_sync)) {
if (!disableSyncFence &&
mEGL->IsExtensionSupported(GLLibraryEGL::KHR_fence_sync))
{
mGL->MakeCurrent();
mSync = mEGL->fCreateSync(mEGL->Display(),
LOCAL_EGL_SYNC_FENCE,