Bug 1827591 - Avoid setting GL_MAP_INVALIDATE_RANGE_BIT on Adreno devices. r=gfx-reviewers,lsalzman

Like on older Mali devices, the combination of
GL_MAP_INVALIDATE_RANGE_BIT with GL_MAP_UNSYNCHRONIZED_BIT appears to
be slow on a wide range of Adreno devices, so drop the former.

Differential Revision: https://phabricator.services.mozilla.com/D175230
This commit is contained in:
Jamie Nicol 2023-04-12 11:49:58 +00:00
Родитель b374ec9080
Коммит 06ac399c37
1 изменённых файлов: 5 добавлений и 4 удалений

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

@ -212,10 +212,11 @@ void WebGLBuffer::BufferSubData(GLenum target, uint64_t rawDstByteOffset,
GLbitfield access = LOCAL_GL_MAP_WRITE_BIT |
LOCAL_GL_MAP_UNSYNCHRONIZED_BIT |
LOCAL_GL_MAP_INVALIDATE_RANGE_BIT;
// On some Mali devices there are known performance issues with the
// combination of GL_MAP_UNSYNCHRONIZED_BIT and GL_MAP_INVALIDATE_RANGE_BIT,
// so omit the latter.
if (gl->Renderer() == gl::GLRenderer::MaliT) {
// On some devices there are known performance issues with the combination
// of GL_MAP_UNSYNCHRONIZED_BIT and GL_MAP_INVALIDATE_RANGE_BIT, so omit the
// latter.
if (gl->Renderer() == gl::GLRenderer::MaliT ||
gl->Vendor() == gl::GLVendor::Qualcomm) {
access &= ~LOCAL_GL_MAP_INVALIDATE_RANGE_BIT;
}
mapping = gl->fMapBufferRange(target, dstByteOffset.value(),