tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 8fba39c9fd62c9466aab07ee36823ed0e8e1e008
parent 71b4f75f6415d7d2bff005540cef8061c42ad0fd
Author: Cristina Horotan <chorotan@mozilla.com>
Date:   Thu, 16 Oct 2025 16:17:09 +0300

Revert "Bug 1983036 - Pad vertex buffers with space for an extra vertex on Xclipse GPUs. r=gfx-reviewers,nical" for causing bc failures on gl.rs

This reverts commit 71b4f75f6415d7d2bff005540cef8061c42ad0fd.

Diffstat:
Mgfx/gl/GLContext.cpp | 10----------
Mgfx/gl/GLContext.h | 17+----------------
2 files changed, 1 insertion(+), 26 deletions(-)

diff --git a/gfx/gl/GLContext.cpp b/gfx/gl/GLContext.cpp @@ -885,7 +885,6 @@ bool GLContext::InitImpl() { raw_fGetIntegerv(LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE, &mMaxCubeMapTextureSize); raw_fGetIntegerv(LOCAL_GL_MAX_RENDERBUFFER_SIZE, &mMaxRenderbufferSize); raw_fGetIntegerv(LOCAL_GL_MAX_VIEWPORT_DIMS, mMaxViewportDims); - raw_fGetIntegerv(LOCAL_GL_MAX_VERTEX_ATTRIB_STRIDE, &mMaxVertexAttribStride); if (mWorkAroundDriverBugs) { int maxTexSize = INT32_MAX; @@ -943,15 +942,6 @@ bool GLContext::InitImpl() { mMaxTexOrRbSize = std::min(mMaxTextureSize, mMaxRenderbufferSize); -#ifdef MOZ_WIDGET_ANDROID - if (Renderer() == GLRenderer::SamsungXclipse && jni::GetAPIVersion() == 35) { - // On Samsung Xclipse GPUs on Android 15 attribute values for the final - // vertex in a buffer may be incorrect. Padding the buffer to contain - // enough space for an additional vertex avoids the issue. See bug 1983036. - mVertexBufferExtraPadding = Some(mMaxVertexAttribStride); - } -#endif - //////////////////////////////////////////////////////////////////////////// // We're ready for final setup. diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h @@ -899,18 +899,7 @@ class GLContext : public GenericAtomicRefCounted, public SupportsWeakPtr { public: void fBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) { - if (WorkAroundDriverBugs() && target == LOCAL_GL_ARRAY_BUFFER && - mVertexBufferExtraPadding) { - // Some drivers require extra padding at the end of array buffers. - // See bug 1983036. - raw_fBufferData(target, size + *mVertexBufferExtraPadding, nullptr, - usage); - if (data) { - fBufferSubData(target, 0, size, data); - } - } else { - raw_fBufferData(target, size, data, usage); - } + raw_fBufferData(target, size, data, usage); // bug 744888 if (WorkAroundDriverBugs() && !data && Vendor() == GLVendor::NVIDIA) { @@ -3920,14 +3909,10 @@ class GLContext : public GenericAtomicRefCounted, public SupportsWeakPtr { GLint mMaxCubeMapTextureSize = 0; GLint mMaxRenderbufferSize = 0; GLint mMaxViewportDims[2] = {}; - GLint mMaxVertexAttribStride = 0; GLsizei mMaxSamples = 0; bool mNeedsTextureSizeChecks = false; bool mNeedsFlushBeforeDeleteFB = false; bool mTextureAllocCrashesOnMapFailure = false; - // Amount of additional padding bytes that must be allocated for - // GL_ARRAY_BUFFER buffers to work around driver bugs. See bug 1983036. - Maybe<GLint> mVertexBufferExtraPadding; const bool mWorkAroundDriverBugs; mutable uint64_t mSyncGLCallCount = 0;