mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
No bug - clang-format -p dom/canvas.
MozReview-Commit-ID: 2xylmA1yFvi
This commit is contained in:
parent
16b6c41f0d
commit
a14d2bd45e
@ -145,8 +145,10 @@ bool WebGLContext::InitWebGL2(FailureReason* const out_failReason) {
|
||||
gl->GetUIntegerv(LOCAL_GL_MAX_UNIFORM_BUFFER_BINDINGS,
|
||||
&mGLMaxUniformBufferBindings);
|
||||
|
||||
mGLMinProgramTexelOffset = gl->GetIntAs<uint32_t>(LOCAL_GL_MIN_PROGRAM_TEXEL_OFFSET);
|
||||
mGLMaxProgramTexelOffset = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_PROGRAM_TEXEL_OFFSET);
|
||||
mGLMinProgramTexelOffset =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MIN_PROGRAM_TEXEL_OFFSET);
|
||||
mGLMaxProgramTexelOffset =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_PROGRAM_TEXEL_OFFSET);
|
||||
|
||||
mIndexedUniformBufferBindings.resize(mGLMaxUniformBufferBindings);
|
||||
|
||||
|
@ -428,25 +428,35 @@ bool WebGLContext::InitAndValidateGL(FailureReason* const out_failReason) {
|
||||
////////////////
|
||||
|
||||
if (gl->IsGLES()) {
|
||||
mGLMaxFragmentUniformVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_FRAGMENT_UNIFORM_VECTORS);
|
||||
mGLMaxVertexUniformVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VERTEX_UNIFORM_VECTORS);
|
||||
mGLMaxFragmentUniformVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_FRAGMENT_UNIFORM_VECTORS);
|
||||
mGLMaxVertexUniformVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VERTEX_UNIFORM_VECTORS);
|
||||
if (gl->Version() >= 300) {
|
||||
mGLMaxVertexOutputVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS) / 4;
|
||||
mGLMaxFragmentInputVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS) / 4;
|
||||
mGLMaxVertexOutputVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS) / 4;
|
||||
mGLMaxFragmentInputVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS) / 4;
|
||||
} else {
|
||||
mGLMaxFragmentInputVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VARYING_VECTORS);
|
||||
mGLMaxFragmentInputVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VARYING_VECTORS);
|
||||
mGLMaxVertexOutputVectors = mGLMaxFragmentInputVectors;
|
||||
}
|
||||
} else {
|
||||
mGLMaxFragmentUniformVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS) / 4;
|
||||
mGLMaxVertexUniformVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VERTEX_UNIFORM_COMPONENTS) / 4;
|
||||
mGLMaxFragmentUniformVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS) / 4;
|
||||
mGLMaxVertexUniformVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VERTEX_UNIFORM_COMPONENTS) / 4;
|
||||
|
||||
if (gl->Version() >= 320) {
|
||||
mGLMaxVertexOutputVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS) / 4;
|
||||
mGLMaxFragmentInputVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS) / 4;
|
||||
mGLMaxVertexOutputVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VERTEX_OUTPUT_COMPONENTS) / 4;
|
||||
mGLMaxFragmentInputVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_FRAGMENT_INPUT_COMPONENTS) / 4;
|
||||
} else {
|
||||
// Same enum val as GL2's GL_MAX_VARYING_FLOATS.
|
||||
mGLMaxFragmentInputVectors = gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VARYING_COMPONENTS) / 4;
|
||||
mGLMaxFragmentInputVectors =
|
||||
gl->GetIntAs<uint32_t>(LOCAL_GL_MAX_VARYING_COMPONENTS) / 4;
|
||||
mGLMaxVertexOutputVectors = mGLMaxFragmentInputVectors;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user