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

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

Issue 921023002: Add glGetActiveUniformsiv to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uniform
Patch Set: 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 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1211 // TODO(gman): GetActiveUniformBlockiv
1212 1212
1213 // TODO(gman): GetActiveUniformBlockName 1213 // TODO(gman): GetActiveUniformBlockName
1214 1214
1215 // TODO(gman): GetActiveUniformsiv
1216
1215 // TODO(gman): GetAttachedShaders 1217 // TODO(gman): GetAttachedShaders
1216 1218
1217 // TODO(gman): GetAttribLocation 1219 // TODO(gman): GetAttribLocation
1218 1220
1219 TEST_P(GLES2DecoderTest1, GetBooleanvValidArgs) { 1221 TEST_P(GLES2DecoderTest1, GetBooleanvValidArgs) {
1220 EXPECT_CALL(*gl_, GetError()) 1222 EXPECT_CALL(*gl_, GetError())
1221 .WillOnce(Return(GL_NO_ERROR)) 1223 .WillOnce(Return(GL_NO_ERROR))
1222 .WillOnce(Return(GL_NO_ERROR)) 1224 .WillOnce(Return(GL_NO_ERROR))
1223 .RetiresOnSaturation(); 1225 .RetiresOnSaturation();
1224 SpecializedSetup<cmds::GetBooleanv, 0>(true); 1226 SpecializedSetup<cmds::GetBooleanv, 0>(true);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 kInvalidSharedMemoryOffset); 1805 kInvalidSharedMemoryOffset);
1804 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1806 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1805 EXPECT_EQ(0u, result->size); 1807 EXPECT_EQ(0u, result->size);
1806 } 1808 }
1807 // TODO(gman): GetShaderInfoLog 1809 // TODO(gman): GetShaderInfoLog
1808 // TODO(gman): GetShaderPrecisionFormat 1810 // TODO(gman): GetShaderPrecisionFormat
1809 1811
1810 // TODO(gman): GetShaderSource 1812 // TODO(gman): GetShaderSource
1811 // TODO(gman): GetString 1813 // TODO(gman): GetString
1812 1814
1813 TEST_P(GLES2DecoderTest1, GetTexParameterfvValidArgs) {
1814 EXPECT_CALL(*gl_, GetError())
1815 .WillOnce(Return(GL_NO_ERROR))
1816 .WillOnce(Return(GL_NO_ERROR))
1817 .RetiresOnSaturation();
1818 SpecializedSetup<cmds::GetTexParameterfv, 0>(true);
1819 typedef cmds::GetTexParameterfv::Result Result;
1820 Result* result = static_cast<Result*>(shared_memory_address_);
1821 EXPECT_CALL(*gl_, GetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
1822 result->GetData()));
1823 result->size = 0;
1824 cmds::GetTexParameterfv cmd;
1825 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1826 shared_memory_offset_);
1827 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1828 EXPECT_EQ(
1829 decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_TEXTURE_MAG_FILTER),
1830 result->GetNumResults());
1831 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1832 }
1833
1834 TEST_P(GLES2DecoderTest1, GetTexParameterfvInvalidArgs0_0) {
1835 EXPECT_CALL(*gl_, GetTexParameterfv(_, _, _)).Times(0);
1836 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1837 cmds::GetTexParameterfv::Result* result =
1838 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1839 result->size = 0;
1840 cmds::GetTexParameterfv cmd;
1841 cmd.Init(GL_PROXY_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1842 shared_memory_offset_);
1843 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1844 EXPECT_EQ(0u, result->size);
1845 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1846 }
1847
1848 TEST_P(GLES2DecoderTest1, GetTexParameterfvInvalidArgs1_0) {
1849 EXPECT_CALL(*gl_, GetTexParameterfv(_, _, _)).Times(0);
1850 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1851 cmds::GetTexParameterfv::Result* result =
1852 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1853 result->size = 0;
1854 cmds::GetTexParameterfv cmd;
1855 cmd.Init(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, shared_memory_id_,
1856 shared_memory_offset_);
1857 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1858 EXPECT_EQ(0u, result->size);
1859 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1860 }
1861
1862 TEST_P(GLES2DecoderTest1, GetTexParameterfvInvalidArgs2_0) {
1863 EXPECT_CALL(*gl_, GetTexParameterfv(_, _, _)).Times(0);
1864 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1865 cmds::GetTexParameterfv::Result* result =
1866 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1867 result->size = 0;
1868 cmds::GetTexParameterfv cmd;
1869 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, kInvalidSharedMemoryId, 0);
1870 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1871 EXPECT_EQ(0u, result->size);
1872 }
1873
1874 TEST_P(GLES2DecoderTest1, GetTexParameterfvInvalidArgs2_1) {
1875 EXPECT_CALL(*gl_, GetTexParameterfv(_, _, _)).Times(0);
1876 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1877 cmds::GetTexParameterfv::Result* result =
1878 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1879 result->size = 0;
1880 cmds::GetTexParameterfv cmd;
1881 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1882 kInvalidSharedMemoryOffset);
1883 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1884 EXPECT_EQ(0u, result->size);
1885 }
1886 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_ 1815 #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