Chromium Code Reviews| Index: gpu/command_buffer/service/framebuffer_manager.cc |
| diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc |
| index 84a77d46e74d5175c74c392eca676f0a5cab0ca0..f3e2fdd78bce809d0290292a6b1d339a4293f518 100644 |
| --- a/gpu/command_buffer/service/framebuffer_manager.cc |
| +++ b/gpu/command_buffer/service/framebuffer_manager.cc |
| @@ -747,6 +747,20 @@ GLenum Framebuffer::IsPossiblyComplete(const FeatureInfo* feature_info) const { |
| } |
| } |
| + // Binding different images to depth and stencil attachment points should |
| + // return FRAMEBUFFER_UNSUPPORTED. |
| + AttachmentMap::const_iterator depth_it = attachments_.find( |
|
qiankun
2016/07/21 09:29:21
You can use GetAttachment() to get pointer of an a
|
| + GL_DEPTH_ATTACHMENT); |
| + AttachmentMap::const_iterator stencil_it = attachments_.find( |
| + GL_STENCIL_ATTACHMENT); |
| + if (depth_it != attachments_.end() && stencil_it != attachments_.end()) { |
| + Attachment *depth_attachment = depth_it->second.get(); |
| + Attachment *stencil_attachment = stencil_it->second.get(); |
| + if (!depth_attachment->IsSameAttachment(stencil_attachment)) { |
| + return GL_FRAMEBUFFER_UNSUPPORTED; |
| + } |
| + } |
| + |
| // This does not mean the framebuffer is actually complete. It just means our |
| // checks passed. |
| return GL_FRAMEBUFFER_COMPLETE; |