commit db4f5b168b8a4d3ef4d28c1a089acdc26eaa1988
parent f53aa4e697f66952c02dcff2f583d86276713579
Author: Serban Stanca <sstanca@mozilla.com>
Date: Wed, 15 Oct 2025 23:07:52 +0300
Revert "Bug 1983036 - Pad vertex buffers with space for an extra vertex on Xclipse GPUs. r=gfx-reviewers,nical" as requested for landing it wrongly.
This reverts commit cc900f29e5c40b15e8c0fcf21d3baa6ee90f929a.
Diffstat:
2 files changed, 1 insertion(+), 22 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,14 +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) {
- raw_fBufferData(target, size + *mVertexBufferExtraPadding, nullptr,
- usage);
- 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) {
@@ -3916,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.
- Maybe<GLint> mVertexBufferExtraPadding;
const bool mWorkAroundDriverBugs;
mutable uint64_t mSyncGLCallCount = 0;