Bug 1325468 - An unspecified fb attachment should have a COLOR_ENCODING of LINEAR. - r=daoshengmu

MozReview-Commit-ID: BhrlgFln2sZ
This commit is contained in:
Jeff Gilbert 2016-12-22 13:19:03 -08:00
parent dc3a2d1239
commit 02fcc3f257

View File

@ -501,8 +501,12 @@ WebGLFBAttachPoint::GetParameter(const char* funcName, WebGLContext* webgl, JSCo
}
const auto usage = Format();
if (!usage)
if (!usage) {
if (pname == LOCAL_GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING)
return JS::NumberValue(LOCAL_GL_LINEAR);
return JS::NullValue();
}
auto format = usage->format;