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 caa129e9fc3625a0b4727aa225f7654df75ce9ec..046c022b008cf51a56bd7b48e62a5df148ce71db 100644 |
--- a/gpu/command_buffer/service/framebuffer_manager.cc |
+++ b/gpu/command_buffer/service/framebuffer_manager.cc |
@@ -762,6 +762,16 @@ GLenum Framebuffer::IsPossiblyComplete(const FeatureInfo* feature_info) const { |
} |
} |
+ // Binding different images to depth and stencil attachment points should |
+ // return FRAMEBUFFER_UNSUPPORTED. |
+ const Attachment* depth_attachment = GetAttachment(GL_DEPTH_ATTACHMENT); |
+ const Attachment* stencil_attachment = GetAttachment(GL_STENCIL_ATTACHMENT); |
+ if (depth_attachment && stencil_attachment) { |
+ 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; |