Chromium Code Reviews| 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 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2102 kSharedMemoryId, | 2102 kSharedMemoryId, |
| 2103 kSharedMemoryOffset, | 2103 kSharedMemoryOffset, |
| 2104 GL_FALSE); | 2104 GL_FALSE); |
| 2105 EXPECT_EQ(error::kNoError, ExecuteCmd(tex_sub_cmd)); | 2105 EXPECT_EQ(error::kNoError, ExecuteCmd(tex_sub_cmd)); |
| 2106 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); | 2106 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
| 2107 | 2107 |
| 2108 // Check that trying to CopyTexImage2D fails | 2108 // Check that trying to CopyTexImage2D fails |
| 2109 CopyTexImage2D copy_tex_cmd; | 2109 CopyTexImage2D copy_tex_cmd; |
| 2110 copy_tex_cmd.Init(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, 0, 1, 1); | 2110 copy_tex_cmd.Init(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, 0, 1, 1); |
| 2111 EXPECT_EQ(error::kNoError, ExecuteCmd(copy_tex_cmd)); | 2111 EXPECT_EQ(error::kNoError, ExecuteCmd(copy_tex_cmd)); |
| 2112 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); | 2112 EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); |
|
no sievers
2015/03/13 00:15:54
Shouldn't this still be INVALID_OPERATION accordin
Zhenyao Mo
2015/03/13 02:38:33
According to the core spec, any internalformat not
no sievers
2015/03/13 19:44:18
OK looks like OpenGL 4 indeed says:
" An invalid v
Zhenyao Mo
2015/03/13 20:25:14
Done.
| |
| 2113 | 2113 |
| 2114 // Check that trying to CopyTexSubImage2D fails | 2114 // Check that trying to CopyTexSubImage2D fails |
| 2115 CopyTexSubImage2D copy_sub_cmd; | 2115 CopyTexSubImage2D copy_sub_cmd; |
| 2116 copy_sub_cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1); | 2116 copy_sub_cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1); |
| 2117 EXPECT_EQ(error::kNoError, ExecuteCmd(copy_sub_cmd)); | 2117 EXPECT_EQ(error::kNoError, ExecuteCmd(copy_sub_cmd)); |
| 2118 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); | 2118 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
| 2119 } | 2119 } |
| 2120 | 2120 |
| 2121 TEST_P(GLES2DecoderManualInitTest, GenerateMipmapDepthTexture) { | 2121 TEST_P(GLES2DecoderManualInitTest, GenerateMipmapDepthTexture) { |
| 2122 InitState init; | 2122 InitState init; |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2912 // TODO(gman): CompressedTexSubImage2DImmediate | 2912 // TODO(gman): CompressedTexSubImage2DImmediate |
| 2913 | 2913 |
| 2914 // TODO(gman): TexImage2D | 2914 // TODO(gman): TexImage2D |
| 2915 | 2915 |
| 2916 // TODO(gman): TexImage2DImmediate | 2916 // TODO(gman): TexImage2DImmediate |
| 2917 | 2917 |
| 2918 // TODO(gman): TexSubImage2DImmediate | 2918 // TODO(gman): TexSubImage2DImmediate |
| 2919 | 2919 |
| 2920 } // namespace gles2 | 2920 } // namespace gles2 |
| 2921 } // namespace gpu | 2921 } // namespace gpu |
| OLD | NEW |