зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1184786 - Fix LastColorAttachment(). r=jgilbert
This commit is contained in:
Родитель
d2b9501e76
Коммит
16d9df4f71
|
@ -1403,10 +1403,8 @@ protected:
|
|||
WebGLRefPtr<WebGLProgram> mCurrentProgram;
|
||||
RefPtr<const webgl::LinkedProgramInfo> mActiveProgramLinkInfo;
|
||||
|
||||
uint32_t mMaxFramebufferColorAttachments;
|
||||
|
||||
GLenum LastColorAttachment() const {
|
||||
return LOCAL_GL_COLOR_ATTACHMENT0 + mMaxFramebufferColorAttachments - 1;
|
||||
return LOCAL_GL_COLOR_ATTACHMENT0 + mGLMaxColorAttachments - 1;
|
||||
}
|
||||
|
||||
bool ValidateFramebufferTarget(GLenum target, const char* const info);
|
||||
|
|
|
@ -401,15 +401,8 @@ WebGLContext::ValidateFramebufferAttachment(const WebGLFramebuffer* fb, GLenum a
|
|||
return true;
|
||||
}
|
||||
|
||||
GLenum colorAttachCount = 1;
|
||||
if (IsExtensionEnabled(WebGLExtensionID::WEBGL_draw_buffers))
|
||||
colorAttachCount = mGLMaxColorAttachments;
|
||||
|
||||
if (attachment >= LOCAL_GL_COLOR_ATTACHMENT0 &&
|
||||
attachment < GLenum(LOCAL_GL_COLOR_ATTACHMENT0 + colorAttachCount))
|
||||
{
|
||||
if (attachment >= LOCAL_GL_COLOR_ATTACHMENT0 && attachment <= LastColorAttachment())
|
||||
return true;
|
||||
}
|
||||
|
||||
ErrorInvalidEnum("%s: attachment: invalid enum value 0x%x.", funcName,
|
||||
attachment);
|
||||
|
@ -1885,9 +1878,6 @@ WebGLContext::InitAndValidateGL()
|
|||
}
|
||||
}
|
||||
|
||||
// Always 1 for GLES2
|
||||
mMaxFramebufferColorAttachments = 1;
|
||||
|
||||
if (gl->IsCompatibilityProfile()) {
|
||||
// gl_PointSize is always available in ES2 GLSL, but has to be
|
||||
// specifically enabled on desktop GLSL.
|
||||
|
|
Загрузка…
Ссылка в новой задаче