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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h

Issue 894373004: Add glGetActiveUniformBlockiv to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win bots Created 5 years, 10 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 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 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 cmd->Init(1, &client_transformfeedback_id_); 1201 cmd->Init(1, &client_transformfeedback_id_);
1202 decoder_->set_unsafe_es3_apis_enabled(true); 1202 decoder_->set_unsafe_es3_apis_enabled(true);
1203 EXPECT_EQ(error::kInvalidArguments, 1203 EXPECT_EQ(error::kInvalidArguments,
1204 ExecuteImmediateCmd(*cmd, sizeof(&client_transformfeedback_id_))); 1204 ExecuteImmediateCmd(*cmd, sizeof(&client_transformfeedback_id_)));
1205 decoder_->set_unsafe_es3_apis_enabled(false); 1205 decoder_->set_unsafe_es3_apis_enabled(false);
1206 } 1206 }
1207 // TODO(gman): GetActiveAttrib 1207 // TODO(gman): GetActiveAttrib
1208 1208
1209 // TODO(gman): GetActiveUniform 1209 // TODO(gman): GetActiveUniform
1210 1210
1211 // TODO(gman): GetActiveUniformBlockiv
1212
1211 // TODO(gman): GetActiveUniformBlockName 1213 // TODO(gman): GetActiveUniformBlockName
1212 1214
1213 // TODO(gman): GetAttachedShaders 1215 // TODO(gman): GetAttachedShaders
1214 1216
1215 // TODO(gman): GetAttribLocation 1217 // TODO(gman): GetAttribLocation
1216 1218
1217 TEST_P(GLES2DecoderTest1, GetBooleanvValidArgs) { 1219 TEST_P(GLES2DecoderTest1, GetBooleanvValidArgs) {
1218 EXPECT_CALL(*gl_, GetError()) 1220 EXPECT_CALL(*gl_, GetError())
1219 .WillOnce(Return(GL_NO_ERROR)) 1221 .WillOnce(Return(GL_NO_ERROR))
1220 .WillOnce(Return(GL_NO_ERROR)) 1222 .WillOnce(Return(GL_NO_ERROR))
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 SpecializedSetup<cmds::GetTexParameterfv, 0>(false); 1876 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1875 cmds::GetTexParameterfv::Result* result = 1877 cmds::GetTexParameterfv::Result* result =
1876 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_); 1878 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1877 result->size = 0; 1879 result->size = 0;
1878 cmds::GetTexParameterfv cmd; 1880 cmds::GetTexParameterfv cmd;
1879 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_, 1881 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1880 kInvalidSharedMemoryOffset); 1882 kInvalidSharedMemoryOffset);
1881 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1883 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1882 EXPECT_EQ(0u, result->size); 1884 EXPECT_EQ(0u, result->size);
1883 } 1885 }
1884
1885 TEST_P(GLES2DecoderTest1, GetTexParameterivValidArgs) {
1886 EXPECT_CALL(*gl_, GetError())
1887 .WillOnce(Return(GL_NO_ERROR))
1888 .WillOnce(Return(GL_NO_ERROR))
1889 .RetiresOnSaturation();
1890 SpecializedSetup<cmds::GetTexParameteriv, 0>(true);
1891 typedef cmds::GetTexParameteriv::Result Result;
1892 Result* result = static_cast<Result*>(shared_memory_address_);
1893 EXPECT_CALL(*gl_, GetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
1894 result->GetData()));
1895 result->size = 0;
1896 cmds::GetTexParameteriv cmd;
1897 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1898 shared_memory_offset_);
1899 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1900 EXPECT_EQ(
1901 decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_TEXTURE_MAG_FILTER),
1902 result->GetNumResults());
1903 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1904 }
1905
1906 TEST_P(GLES2DecoderTest1, GetTexParameterivInvalidArgs0_0) {
1907 EXPECT_CALL(*gl_, GetTexParameteriv(_, _, _)).Times(0);
1908 SpecializedSetup<cmds::GetTexParameteriv, 0>(false);
1909 cmds::GetTexParameteriv::Result* result =
1910 static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_);
1911 result->size = 0;
1912 cmds::GetTexParameteriv cmd;
1913 cmd.Init(GL_PROXY_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1914 shared_memory_offset_);
1915 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1916 EXPECT_EQ(0u, result->size);
1917 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1918 }
1919
1920 TEST_P(GLES2DecoderTest1, GetTexParameterivInvalidArgs1_0) {
1921 EXPECT_CALL(*gl_, GetTexParameteriv(_, _, _)).Times(0);
1922 SpecializedSetup<cmds::GetTexParameteriv, 0>(false);
1923 cmds::GetTexParameteriv::Result* result =
1924 static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_);
1925 result->size = 0;
1926 cmds::GetTexParameteriv cmd;
1927 cmd.Init(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, shared_memory_id_,
1928 shared_memory_offset_);
1929 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1930 EXPECT_EQ(0u, result->size);
1931 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1932 }
1933
1934 TEST_P(GLES2DecoderTest1, GetTexParameterivInvalidArgs2_0) {
1935 EXPECT_CALL(*gl_, GetTexParameteriv(_, _, _)).Times(0);
1936 SpecializedSetup<cmds::GetTexParameteriv, 0>(false);
1937 cmds::GetTexParameteriv::Result* result =
1938 static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_);
1939 result->size = 0;
1940 cmds::GetTexParameteriv cmd;
1941 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, kInvalidSharedMemoryId, 0);
1942 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1943 EXPECT_EQ(0u, result->size);
1944 }
1945
1946 TEST_P(GLES2DecoderTest1, GetTexParameterivInvalidArgs2_1) {
1947 EXPECT_CALL(*gl_, GetTexParameteriv(_, _, _)).Times(0);
1948 SpecializedSetup<cmds::GetTexParameteriv, 0>(false);
1949 cmds::GetTexParameteriv::Result* result =
1950 static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_);
1951 result->size = 0;
1952 cmds::GetTexParameteriv cmd;
1953 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1954 kInvalidSharedMemoryOffset);
1955 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1956 EXPECT_EQ(0u, result->size);
1957 }
1958 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_ 1886 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698