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 5653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5664 } | 5664 } |
5665 | 5665 |
5666 void GLES2DecoderImpl::DoResumeTransformFeedback() { | 5666 void GLES2DecoderImpl::DoResumeTransformFeedback() { |
5667 DCHECK(state_.bound_transform_feedback.get()); | 5667 DCHECK(state_.bound_transform_feedback.get()); |
5668 if (!state_.bound_transform_feedback->active() || | 5668 if (!state_.bound_transform_feedback->active() || |
5669 !state_.bound_transform_feedback->paused()) { | 5669 !state_.bound_transform_feedback->paused()) { |
5670 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glResumeTransformFeedback", | 5670 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glResumeTransformFeedback", |
5671 "transform feedback is not active or not paused"); | 5671 "transform feedback is not active or not paused"); |
5672 return; | 5672 return; |
5673 } | 5673 } |
| 5674 if (feature_info_->workarounds().rebind_transform_feedback_before_resume) { |
| 5675 glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, 0); |
| 5676 glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, |
| 5677 state_.bound_transform_feedback->service_id()); |
| 5678 } |
5674 state_.bound_transform_feedback->DoResumeTransformFeedback(); | 5679 state_.bound_transform_feedback->DoResumeTransformFeedback(); |
5675 } | 5680 } |
5676 | 5681 |
5677 void GLES2DecoderImpl::DoDisableVertexAttribArray(GLuint index) { | 5682 void GLES2DecoderImpl::DoDisableVertexAttribArray(GLuint index) { |
5678 if (state_.vertex_attrib_manager->Enable(index, false)) { | 5683 if (state_.vertex_attrib_manager->Enable(index, false)) { |
5679 if (index != 0 || gl_version_info().BehavesLikeGLES()) { | 5684 if (index != 0 || gl_version_info().BehavesLikeGLES()) { |
5680 glDisableVertexAttribArray(index); | 5685 glDisableVertexAttribArray(index); |
5681 } | 5686 } |
5682 } else { | 5687 } else { |
5683 LOCAL_SET_GL_ERROR( | 5688 LOCAL_SET_GL_ERROR( |
(...skipping 12029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17713 } | 17718 } |
17714 | 17719 |
17715 // Include the auto-generated part of this file. We split this because it means | 17720 // Include the auto-generated part of this file. We split this because it means |
17716 // we can easily edit the non-auto generated parts right here in this file | 17721 // we can easily edit the non-auto generated parts right here in this file |
17717 // instead of having to edit some template or the code generator. | 17722 // instead of having to edit some template or the code generator. |
17718 #include "base/macros.h" | 17723 #include "base/macros.h" |
17719 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17724 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
17720 | 17725 |
17721 } // namespace gles2 | 17726 } // namespace gles2 |
17722 } // namespace gpu | 17727 } // namespace gpu |
OLD | NEW |