Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: gpu/command_buffer/service/framebuffer_manager.cc

Issue 2161383002: Add check if depth and stencil attachments are same image (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change NULL to nullptr Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698