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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 // check bad name "name[1]" non zero | 974 // check bad name "name[1]" non zero |
975 SetBucketAsCString(kBucketId, kBadName2); | 975 SetBucketAsCString(kBucketId, kBadName2); |
976 cmd.Init(client_program_id_, | 976 cmd.Init(client_program_id_, |
977 kLocation, | 977 kLocation, |
978 kBucketId); | 978 kBucketId); |
979 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 979 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
980 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); | 980 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); |
981 } | 981 } |
982 | 982 |
983 TEST_P(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) { | 983 TEST_P(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) { |
984 CommandLine command_line(0, NULL); | 984 base::CommandLine command_line(0, NULL); |
985 command_line.AppendSwitchASCII( | 985 command_line.AppendSwitchASCII( |
986 switches::kGpuDriverBugWorkarounds, | 986 switches::kGpuDriverBugWorkarounds, |
987 base::IntToString(gpu::CLEAR_UNIFORMS_BEFORE_FIRST_PROGRAM_USE)); | 987 base::IntToString(gpu::CLEAR_UNIFORMS_BEFORE_FIRST_PROGRAM_USE)); |
988 InitState init; | 988 InitState init; |
989 init.gl_version = "3.0"; | 989 init.gl_version = "3.0"; |
990 init.has_alpha = true; | 990 init.has_alpha = true; |
991 init.request_alpha = true; | 991 init.request_alpha = true; |
992 init.bind_generates_resource = true; | 992 init.bind_generates_resource = true; |
993 InitDecoderWithCommandLine(init, &command_line); | 993 InitDecoderWithCommandLine(init, &command_line); |
994 { | 994 { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 } | 1036 } |
1037 | 1037 |
1038 // TODO(gman): DeleteProgram | 1038 // TODO(gman): DeleteProgram |
1039 | 1039 |
1040 // TODO(gman): UseProgram | 1040 // TODO(gman): UseProgram |
1041 | 1041 |
1042 // TODO(gman): DeleteShader | 1042 // TODO(gman): DeleteShader |
1043 | 1043 |
1044 } // namespace gles2 | 1044 } // namespace gles2 |
1045 } // namespace gpu | 1045 } // namespace gpu |
OLD | NEW |