OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 7625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7636 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, func_name, | 7636 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, func_name, |
7637 "incompatible src/dst color formats"); | 7637 "incompatible src/dst color formats"); |
7638 return; | 7638 return; |
7639 } | 7639 } |
7640 // Check whether draw buffers have identical color image with read buffer | 7640 // Check whether draw buffers have identical color image with read buffer |
7641 if (is_feedback_loop == FeedbackLoopUnknown) { | 7641 if (is_feedback_loop == FeedbackLoopUnknown) { |
7642 GLenum attachment = static_cast<GLenum>(GL_COLOR_ATTACHMENT0 + ii); | 7642 GLenum attachment = static_cast<GLenum>(GL_COLOR_ATTACHMENT0 + ii); |
7643 DCHECK(draw_framebuffer); | 7643 DCHECK(draw_framebuffer); |
7644 const Framebuffer::Attachment* draw_buffer = | 7644 const Framebuffer::Attachment* draw_buffer = |
7645 draw_framebuffer->GetAttachment(attachment); | 7645 draw_framebuffer->GetAttachment(attachment); |
7646 if (!draw_buffer) { | 7646 if (!draw_buffer || !read_buffer) { |
7647 continue; | 7647 continue; |
7648 } | 7648 } |
7649 if (draw_buffer->IsSameAttachment(read_buffer)) { | 7649 if (draw_buffer->IsSameAttachment(read_buffer)) { |
7650 is_feedback_loop = FeedbackLoopTrue; | 7650 is_feedback_loop = FeedbackLoopTrue; |
7651 break; | 7651 break; |
7652 } | 7652 } |
7653 } | 7653 } |
7654 } | 7654 } |
7655 } | 7655 } |
7656 if (is_feedback_loop == FeedbackLoopTrue) { | 7656 if (is_feedback_loop == FeedbackLoopTrue) { |
(...skipping 10321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17978 } | 17978 } |
17979 | 17979 |
17980 // Include the auto-generated part of this file. We split this because it means | 17980 // Include the auto-generated part of this file. We split this because it means |
17981 // we can easily edit the non-auto generated parts right here in this file | 17981 // we can easily edit the non-auto generated parts right here in this file |
17982 // instead of having to edit some template or the code generator. | 17982 // instead of having to edit some template or the code generator. |
17983 #include "base/macros.h" | 17983 #include "base/macros.h" |
17984 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17984 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
17985 | 17985 |
17986 } // namespace gles2 | 17986 } // namespace gles2 |
17987 } // namespace gpu | 17987 } // namespace gpu |
OLD | NEW |