OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1025 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
1026 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); | 1026 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); |
1027 } | 1027 } |
1028 | 1028 |
1029 TEST_P(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) { | 1029 TEST_P(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) { |
1030 base::CommandLine command_line(0, NULL); | 1030 base::CommandLine command_line(0, NULL); |
1031 command_line.AppendSwitchASCII( | 1031 command_line.AppendSwitchASCII( |
1032 switches::kGpuDriverBugWorkarounds, | 1032 switches::kGpuDriverBugWorkarounds, |
1033 base::IntToString(gpu::CLEAR_UNIFORMS_BEFORE_FIRST_PROGRAM_USE)); | 1033 base::IntToString(gpu::CLEAR_UNIFORMS_BEFORE_FIRST_PROGRAM_USE)); |
1034 InitState init; | 1034 InitState init; |
1035 init.gl_version = "3.0"; | |
1036 init.has_alpha = true; | 1035 init.has_alpha = true; |
1037 init.request_alpha = true; | 1036 init.request_alpha = true; |
1038 init.bind_generates_resource = true; | 1037 init.bind_generates_resource = true; |
1039 InitDecoderWithCommandLine(init, &command_line); | 1038 InitDecoderWithCommandLine(init, &command_line); |
1040 { | 1039 { |
1041 static AttribInfo attribs[] = { | 1040 static AttribInfo attribs[] = { |
1042 { | 1041 { |
1043 kAttrib1Name, kAttrib1Size, kAttrib1Type, kAttrib1Location, | 1042 kAttrib1Name, kAttrib1Size, kAttrib1Type, kAttrib1Location, |
1044 }, | 1043 }, |
1045 { | 1044 { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 } | 1081 } |
1083 | 1082 |
1084 // TODO(gman): DeleteProgram | 1083 // TODO(gman): DeleteProgram |
1085 | 1084 |
1086 // TODO(gman): UseProgram | 1085 // TODO(gman): UseProgram |
1087 | 1086 |
1088 // TODO(gman): DeleteShader | 1087 // TODO(gman): DeleteShader |
1089 | 1088 |
1090 } // namespace gles2 | 1089 } // namespace gles2 |
1091 } // namespace gpu | 1090 } // namespace gpu |
OLD | NEW |