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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1021 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
1022 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); | 1022 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); |
1023 } | 1023 } |
1024 | 1024 |
1025 TEST_P(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) { | 1025 TEST_P(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) { |
1026 base::CommandLine command_line(0, NULL); | 1026 base::CommandLine command_line(0, NULL); |
1027 command_line.AppendSwitchASCII( | 1027 command_line.AppendSwitchASCII( |
1028 switches::kGpuDriverBugWorkarounds, | 1028 switches::kGpuDriverBugWorkarounds, |
1029 base::IntToString(gpu::CLEAR_UNIFORMS_BEFORE_FIRST_PROGRAM_USE)); | 1029 base::IntToString(gpu::CLEAR_UNIFORMS_BEFORE_FIRST_PROGRAM_USE)); |
1030 InitState init; | 1030 InitState init; |
1031 init.gl_version = "3.0"; | |
1032 init.has_alpha = true; | 1031 init.has_alpha = true; |
1033 init.request_alpha = true; | 1032 init.request_alpha = true; |
1034 init.bind_generates_resource = true; | 1033 init.bind_generates_resource = true; |
1035 InitDecoderWithCommandLine(init, &command_line); | 1034 InitDecoderWithCommandLine(init, &command_line); |
1036 { | 1035 { |
1037 static AttribInfo attribs[] = { | 1036 static AttribInfo attribs[] = { |
1038 { | 1037 { |
1039 kAttrib1Name, kAttrib1Size, kAttrib1Type, kAttrib1Location, | 1038 kAttrib1Name, kAttrib1Size, kAttrib1Type, kAttrib1Location, |
1040 }, | 1039 }, |
1041 { | 1040 { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 } | 1077 } |
1079 | 1078 |
1080 // TODO(gman): DeleteProgram | 1079 // TODO(gman): DeleteProgram |
1081 | 1080 |
1082 // TODO(gman): UseProgram | 1081 // TODO(gman): UseProgram |
1083 | 1082 |
1084 // TODO(gman): DeleteShader | 1083 // TODO(gman): DeleteShader |
1085 | 1084 |
1086 } // namespace gles2 | 1085 } // namespace gles2 |
1087 } // namespace gpu | 1086 } // namespace gpu |
OLD | NEW |