Bug 1233626 - Default MaxDrawingBuffers to 1 unless ext/webgl2. - r=jrmuizel

This commit is contained in:
Jeff Gilbert 2016-02-05 16:42:33 -08:00
parent 8969ca59b4
commit 5ec3468fb3

View File

@ -148,7 +148,10 @@ WebGLContext::CreateShaderValidator(GLenum shaderType) const
resources.MaxCombinedTextureImageUnits = mGLMaxTextureUnits;
resources.MaxTextureImageUnits = mGLMaxTextureImageUnits;
resources.MaxFragmentUniformVectors = mGLMaxFragmentUniformVectors;
resources.MaxDrawBuffers = mGLMaxDrawBuffers;
const bool hasMRTs = (IsWebGL2() ||
IsExtensionEnabled(WebGLExtensionID::WEBGL_draw_buffers));
resources.MaxDrawBuffers = (hasMRTs ? mGLMaxDrawBuffers : 1);
if (IsExtensionEnabled(WebGLExtensionID::EXT_frag_depth))
resources.EXT_frag_depth = 1;