summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-04-09 01:59:40 +0200
committerMoonchild <moonchild@palemoon.org>2022-04-09 01:59:40 +0200
commitf9caae6cfde7b22fd37370365a540ed23f772ed6 (patch)
tree918b8663a206b388d51a90735c3cc9de52bc27cb /dom
parente10f9df9df3c71e1c1c8424d56f4967969a02c14 (diff)
downloaduxp-f9caae6cfde7b22fd37370365a540ed23f772ed6.tar.gz
Fix Mesa check + whitespace
Diffstat (limited to 'dom')
-rw-r--r--dom/canvas/WebGLContextDraw.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/dom/canvas/WebGLContextDraw.cpp b/dom/canvas/WebGLContextDraw.cpp
index e7c188ac10..c0ba20301a 100644
--- a/dom/canvas/WebGLContextDraw.cpp
+++ b/dom/canvas/WebGLContextDraw.cpp
@@ -1066,14 +1066,14 @@ WebGLContext::DoFakeVertexAttrib0(const char* funcName, GLuint vertexCount)
vertexCount = 1;
}
- if (gl->WorkAroundDriverBugs() && gl->IsMesa()) {
- // Padded/strided to vec4, so 4x4bytes.
- const auto effectiveVertAttribBytes = CheckedInt<int32_t>(vertexCount) * 4 * 4;
- if (!effectiveVertAttribBytes.isValid()) {
- ErrorOutOfMemory("`offset + count` too large for Mesa.");
- return false;
- }
- }
+ if (gl->WorkAroundDriverBugs() && gl->Vendor() == gl::GLVendor::Nouveau) {
+ // Padded/strided to vec4, so 4x4bytes.
+ const auto effectiveVertAttribBytes = CheckedInt<int32_t>(vertexCount) * 4 * 4;
+ if (!effectiveVertAttribBytes.isValid()) {
+ ErrorOutOfMemory("`offset + count` too large for Mesa.");
+ return false;
+ }
+ }
const auto whatDoesAttrib0Need = WhatDoesVertexAttrib0Need();
if (MOZ_LIKELY(whatDoesAttrib0Need == WebGLVertexAttrib0Status::Default))