Bug 1236395 - [WebGL2] pass getFramebufferAttachmentParameter in gl-object-get-calls.html, r=jgilbert

--HG--
extra : rebase_source : 5cab2380be2efc8e6eae0b71183646443f654a5f
This commit is contained in:
peter chang 2016-01-11 19:56:00 +01:00
Родитель a0f2f44d90
Коммит d8bb5481f5
2 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -736,7 +736,7 @@ WebGLContext::GetFramebufferAttachmentParameter(JSContext* cx,
}
switch (attachment) {
case LOCAL_GL_COLOR:
case LOCAL_GL_BACK:
case LOCAL_GL_DEPTH:
case LOCAL_GL_STENCIL:
break;
@ -760,12 +760,12 @@ WebGLContext::GetFramebufferAttachmentParameter(JSContext* cx,
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
if (attachment == LOCAL_GL_COLOR)
if (attachment == LOCAL_GL_BACK)
return JS::NumberValue(8);
return JS::NumberValue(0);
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
if (attachment == LOCAL_GL_COLOR)
if (attachment == LOCAL_GL_BACK)
return JS::NumberValue(mOptions.alpha ? 8 : 0);
return JS::NumberValue(0);

Просмотреть файл

@ -27,8 +27,7 @@ DepthStencilDepthFormat(gl::GLContext* gl)
static bool
SupportsDepthStencil(gl::GLContext* gl)
{
return gl->IsExtensionSupported(gl::GLContext::EXT_packed_depth_stencil) ||
gl->IsExtensionSupported(gl::GLContext::OES_packed_depth_stencil);
return gl->IsSupported(gl::GLFeature::packed_depth_stencil);
}
static bool