Bug 1143876 - Treat invalidate-framebuffer as optional for WebGL2. - r=kamidphish

This commit is contained in:
Jeff Gilbert 2015-03-16 16:29:37 -07:00
Родитель fb77ab1278
Коммит 7fabed0618
2 изменённых файлов: 14 добавлений и 1 удалений

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

@ -81,7 +81,6 @@ static const gl::GLFeature kRequiredFeatures[] = {
gl::GLFeature::gpu_shader4,
gl::GLFeature::instanced_arrays,
gl::GLFeature::instanced_non_arrays,
gl::GLFeature::invalidate_framebuffer,
gl::GLFeature::map_buffer_range,
gl::GLFeature::occlusion_query2,
gl::GLFeature::packed_depth_stencil,

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

@ -398,6 +398,13 @@ WebGL2Context::InvalidateFramebuffer(GLenum target, const dom::Sequence<GLenum>&
}
}
// InvalidateFramebuffer is a hint to the driver. Should be OK to
// skip calls if not supported, for example by OSX 10.9 GL
// drivers.
static bool invalidateFBSupported = gl->IsSupported(gl::GLFeature::invalidate_framebuffer);
if (!invalidateFBSupported)
return;
if (!fb && !isDefaultFB) {
dom::Sequence<GLenum> tmpAttachments;
TranslateDefaultAttachments(attachments, &tmpAttachments);
@ -445,6 +452,13 @@ WebGL2Context::InvalidateSubFramebuffer(GLenum target, const dom::Sequence<GLenu
}
}
// InvalidateFramebuffer is a hint to the driver. Should be OK to
// skip calls if not supported, for example by OSX 10.9 GL
// drivers.
static bool invalidateFBSupported = gl->IsSupported(gl::GLFeature::invalidate_framebuffer);
if (!invalidateFBSupported)
return;
if (!fb && !isDefaultFB) {
dom::Sequence<GLenum> tmpAttachments;
TranslateDefaultAttachments(attachments, &tmpAttachments);