diff --git a/dom/canvas/WebGL2Context.cpp b/dom/canvas/WebGL2Context.cpp index f64661b09f8a..cb102ab7aa3e 100644 --- a/dom/canvas/WebGL2Context.cpp +++ b/dom/canvas/WebGL2Context.cpp @@ -145,8 +145,10 @@ bool WebGLContext::InitWebGL2(FailureReason* const out_failReason) { gl->GetUIntegerv(LOCAL_GL_MAX_UNIFORM_BUFFER_BINDINGS, &mGLMaxUniformBufferBindings); - mGLMinProgramTexelOffset = gl->GetIntAs(LOCAL_GL_MIN_PROGRAM_TEXEL_OFFSET); - mGLMaxProgramTexelOffset = gl->GetIntAs(LOCAL_GL_MAX_PROGRAM_TEXEL_OFFSET); + mGLMinProgramTexelOffset = + gl->GetIntAs(LOCAL_GL_MIN_PROGRAM_TEXEL_OFFSET); + mGLMaxProgramTexelOffset = + gl->GetIntAs(LOCAL_GL_MAX_PROGRAM_TEXEL_OFFSET); mIndexedUniformBufferBindings.resize(mGLMaxUniformBufferBindings); diff --git a/dom/canvas/WebGLContextValidate.cpp b/dom/canvas/WebGLContextValidate.cpp index 0281f102c21b..c06cae013216 100644 --- a/dom/canvas/WebGLContextValidate.cpp +++ b/dom/canvas/WebGLContextValidate.cpp @@ -428,25 +428,35 @@ bool WebGLContext::InitAndValidateGL(FailureReason* const out_failReason) { //////////////// if (gl->IsGLES()) { - mGLMaxFragmentUniformVectors = gl->GetIntAs(LOCAL_GL_MAX_FRAGMENT_UNIFORM_VECTORS); - mGLMaxVertexUniformVectors = gl->GetIntAs(LOCAL_GL_MAX_VERTEX_UNIFORM_VECTORS); + mGLMaxFragmentUniformVectors = + gl->GetIntAs(LOCAL_GL_MAX_FRAGMENT_UNIFORM_VECTORS); + mGLMaxVertexUniformVectors = + gl->GetIntAs(LOCAL_GL_MAX_VERTEX_UNIFORM_VECTORS); if (gl->Version() >= 300) { - mGLMaxVertexOutputVectors = gl->GetIntAs(LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS) / 4; - mGLMaxFragmentInputVectors = gl->GetIntAs(LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS) / 4; + mGLMaxVertexOutputVectors = + gl->GetIntAs(LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS) / 4; + mGLMaxFragmentInputVectors = + gl->GetIntAs(LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS) / 4; } else { - mGLMaxFragmentInputVectors = gl->GetIntAs(LOCAL_GL_MAX_VARYING_VECTORS); + mGLMaxFragmentInputVectors = + gl->GetIntAs(LOCAL_GL_MAX_VARYING_VECTORS); mGLMaxVertexOutputVectors = mGLMaxFragmentInputVectors; } } else { - mGLMaxFragmentUniformVectors = gl->GetIntAs(LOCAL_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS) / 4; - mGLMaxVertexUniformVectors = gl->GetIntAs(LOCAL_GL_MAX_VERTEX_UNIFORM_COMPONENTS) / 4; + mGLMaxFragmentUniformVectors = + gl->GetIntAs(LOCAL_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS) / 4; + mGLMaxVertexUniformVectors = + gl->GetIntAs(LOCAL_GL_MAX_VERTEX_UNIFORM_COMPONENTS) / 4; if (gl->Version() >= 320) { - mGLMaxVertexOutputVectors = gl->GetIntAs(LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS) / 4; - mGLMaxFragmentInputVectors = gl->GetIntAs(LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS) / 4; + mGLMaxVertexOutputVectors = + gl->GetIntAs(LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS) / 4; + mGLMaxFragmentInputVectors = + gl->GetIntAs(LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS) / 4; } else { // Same enum val as GL2's GL_MAX_VARYING_FLOATS. - mGLMaxFragmentInputVectors = gl->GetIntAs(LOCAL_GL_MAX_VARYING_COMPONENTS) / 4; + mGLMaxFragmentInputVectors = + gl->GetIntAs(LOCAL_GL_MAX_VARYING_COMPONENTS) / 4; mGLMaxVertexOutputVectors = mGLMaxFragmentInputVectors; } }