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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2252153003: Add a transform feedback workaround for Intel GPUs on MacOSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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 5695 matching lines...) Expand 10 before | Expand all | Expand 10 after
5706 } 5706 }
5707 5707
5708 void GLES2DecoderImpl::DoResumeTransformFeedback() { 5708 void GLES2DecoderImpl::DoResumeTransformFeedback() {
5709 DCHECK(state_.bound_transform_feedback.get()); 5709 DCHECK(state_.bound_transform_feedback.get());
5710 if (!state_.bound_transform_feedback->active() || 5710 if (!state_.bound_transform_feedback->active() ||
5711 !state_.bound_transform_feedback->paused()) { 5711 !state_.bound_transform_feedback->paused()) {
5712 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glResumeTransformFeedback", 5712 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glResumeTransformFeedback",
5713 "transform feedback is not active or not paused"); 5713 "transform feedback is not active or not paused");
5714 return; 5714 return;
5715 } 5715 }
5716 if (feature_info_->workarounds().use_transform_feedback_temp_unbind) {
5717 glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, 0);
5718 state_.bound_transform_feedback->DoBindTransformFeedback(
Zhenyao Mo 2016/08/18 17:39:31 I think you should just do glBindTransformFeedback
Zhenyao Mo 2016/08/18 18:49:05 1) I am still worried that this is caused by Chrom
Ken Russell (switch to Gerrit) 2016/08/19 00:13:35 I think this is very likely a driver bug. These te
jchen10 2016/08/19 01:01:23 Anyway the worry makes sense to me. I have tried t
5719 GL_TRANSFORM_FEEDBACK);
5720 }
5716 state_.bound_transform_feedback->DoResumeTransformFeedback(); 5721 state_.bound_transform_feedback->DoResumeTransformFeedback();
5717 } 5722 }
5718 5723
5719 void GLES2DecoderImpl::DoDisableVertexAttribArray(GLuint index) { 5724 void GLES2DecoderImpl::DoDisableVertexAttribArray(GLuint index) {
5720 if (state_.vertex_attrib_manager->Enable(index, false)) { 5725 if (state_.vertex_attrib_manager->Enable(index, false)) {
5721 if (index != 0 || gl_version_info().BehavesLikeGLES()) { 5726 if (index != 0 || gl_version_info().BehavesLikeGLES()) {
5722 glDisableVertexAttribArray(index); 5727 glDisableVertexAttribArray(index);
5723 } 5728 }
5724 } else { 5729 } else {
5725 LOCAL_SET_GL_ERROR( 5730 LOCAL_SET_GL_ERROR(
(...skipping 12054 matching lines...) Expand 10 before | Expand all | Expand 10 after
17780 } 17785 }
17781 17786
17782 // Include the auto-generated part of this file. We split this because it means 17787 // Include the auto-generated part of this file. We split this because it means
17783 // we can easily edit the non-auto generated parts right here in this file 17788 // we can easily edit the non-auto generated parts right here in this file
17784 // instead of having to edit some template or the code generator. 17789 // instead of having to edit some template or the code generator.
17785 #include "base/macros.h" 17790 #include "base/macros.h"
17786 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 17791 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
17787 17792
17788 } // namespace gles2 17793 } // namespace gles2
17789 } // namespace gpu 17794 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/config/gpu_driver_bug_list_json.cc » ('j') | gpu/config/gpu_driver_bug_list_json.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698