diff options
author | kloveless@chromium.org <kloveless@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-09 03:30:06 +0000 |
---|---|---|
committer | kloveless@chromium.org <kloveless@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-09 03:30:06 +0000 |
commit | 09c9afcb5ab7466d3a7e81620a1b3ff08b93c0a1 (patch) | |
tree | 9c99f970629752647568a374cd77e135306a3ae0 /gpu | |
parent | 18e785a78732e0887d2148090d76d407f39ed5c9 (diff) | |
download | chromium_src-09c9afcb5ab7466d3a7e81620a1b3ff08b93c0a1.zip chromium_src-09c9afcb5ab7466d3a7e81620a1b3ff08b93c0a1.tar.gz chromium_src-09c9afcb5ab7466d3a7e81620a1b3ff08b93c0a1.tar.bz2 |
Remove TexSubImage2DImmediate, TexImage2DImmediate, CompressedTexImage2D.
BUG=
Review URL: https://codereview.chromium.org/26358003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227655 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
11 files changed, 274 insertions, 508 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 5c47d7a..5769ef3 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -1330,7 +1330,7 @@ _FUNCTION_INFO = { 'CompileShader': {'decoder_func': 'DoCompileShader', 'unit_test': False}, 'CompressedTexImage2D': { 'type': 'Manual', - 'immediate': True, + 'immediate': False, 'bucket': True, }, 'CompressedTexSubImage2D': { @@ -2005,7 +2005,7 @@ _FUNCTION_INFO = { }, 'TexSubImage2D': { 'type': 'Manual', - 'immediate': True, + 'immediate': False, 'client_test': False, 'cmd_args': 'GLenumTextureTarget target, GLint level, ' 'GLint xoffset, GLint yoffset, ' @@ -3648,13 +3648,8 @@ class DataHandler(TypeHandler): file.Write(" uint32 total_size = ComputeSize(_size);\n") elif func.name == 'BufferSubDataImmediate': file.Write(" uint32 total_size = ComputeSize(_size);\n") - elif func.name == 'CompressedTexImage2DImmediate': - file.Write(" uint32 total_size = ComputeSize(_imageSize);\n") elif func.name == 'CompressedTexSubImage2DImmediate': file.Write(" uint32 total_size = ComputeSize(_imageSize);\n") - elif func.name == 'TexSubImage2DImmediate': - file.Write( - " uint32 total_size = 0; // TODO(gman): get correct size\n") def WriteImmediateCmdSizeTest(self, func, file): """Overrriden from TypeHandler.""" @@ -3663,13 +3658,8 @@ class DataHandler(TypeHandler): file.Write(" uint32 total_size = cmd.ComputeSize(cmd.size);\n") elif func.name == 'BufferSubDataImmediate': file.Write(" uint32 total_size = cmd.ComputeSize(cmd.size);\n") - elif func.name == 'CompressedTexImage2DImmediate': - file.Write(" uint32 total_size = cmd.ComputeSize(cmd.imageSize);\n") elif func.name == 'CompressedTexSubImage2DImmediate': file.Write(" uint32 total_size = cmd.ComputeSize(cmd.imageSize);\n") - elif func.name == 'TexSubImage2DImmediate': - file.Write( - " uint32 total_size = 0; // TODO(gman): get correct size\n") file.Write(" EXPECT_EQ(sizeof(cmd), total_size);\n") def WriteImmediateCmdInit(self, func, file): diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h index 916e8bd..8bb763c 100644 --- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h +++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h @@ -225,17 +225,6 @@ } } - void CompressedTexImage2DImmediate( - GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize) { - const uint32 s = 0; // TODO(gman): compute correct size - gles2::cmds::CompressedTexImage2DImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::CompressedTexImage2DImmediate>(s); // NOLINT - if (c) { - c->Init(target, level, internalformat, width, height, border, imageSize); - } - } - void CompressedTexImage2DBucket( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLuint bucket_id) { @@ -1128,19 +1117,6 @@ } } - void TexSubImage2DImmediate( - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLboolean internal) { - const uint32 s = 0; // TODO(gman): compute correct size - gles2::cmds::TexSubImage2DImmediate* c = - GetImmediateCmdSpaceTotalSize<gles2::cmds::TexSubImage2DImmediate>(s); - if (c) { - c->Init( - target, level, xoffset, yoffset, width, height, format, type, - internal); - } - } - void Uniform1f(GLint location, GLfloat x) { gles2::cmds::Uniform1f* c = GetCmdSpace<gles2::cmds::Uniform1f>(); if (c) { diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h index d547ea9..73e82af 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h @@ -1143,75 +1143,6 @@ COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_id) == 32, COMPILE_ASSERT(offsetof(CompressedTexImage2D, data_shm_offset) == 36, OffsetOf_CompressedTexImage2D_data_shm_offset_not_36); -struct CompressedTexImage2DImmediate { - typedef CompressedTexImage2DImmediate ValueType; - static const CommandId kCmdId = kCompressedTexImage2DImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init( - GLenum _target, GLint _level, GLenum _internalformat, GLsizei _width, - GLsizei _height, GLint _border, GLsizei _imageSize) { - uint32 total_size = 0; // TODO(gman): get correct size. - SetHeader(total_size); - target = _target; - level = _level; - internalformat = _internalformat; - width = _width; - height = _height; - border = _border; - imageSize = _imageSize; - } - - void* Set( - void* cmd, GLenum _target, GLint _level, GLenum _internalformat, - GLsizei _width, GLsizei _height, GLint _border, GLsizei _imageSize) { - uint32 total_size = 0; // TODO(gman): get correct size. - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _internalformat, _width, _height, _border, - _imageSize); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 target; - int32 level; - uint32 internalformat; - int32 width; - int32 height; - int32 border; - int32 imageSize; -}; - -COMPILE_ASSERT(sizeof(CompressedTexImage2DImmediate) == 32, - Sizeof_CompressedTexImage2DImmediate_is_not_32); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, header) == 0, - OffsetOf_CompressedTexImage2DImmediate_header_not_0); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, target) == 4, - OffsetOf_CompressedTexImage2DImmediate_target_not_4); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, level) == 8, - OffsetOf_CompressedTexImage2DImmediate_level_not_8); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, internalformat) == 12, - OffsetOf_CompressedTexImage2DImmediate_internalformat_not_12); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, width) == 16, - OffsetOf_CompressedTexImage2DImmediate_width_not_16); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, height) == 20, - OffsetOf_CompressedTexImage2DImmediate_height_not_20); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, border) == 24, - OffsetOf_CompressedTexImage2DImmediate_border_not_24); -COMPILE_ASSERT(offsetof(CompressedTexImage2DImmediate, imageSize) == 28, - OffsetOf_CompressedTexImage2DImmediate_imageSize_not_28); - struct CompressedTexImage2DBucket { typedef CompressedTexImage2DBucket ValueType; static const CommandId kCmdId = kCompressedTexImage2DBucket; @@ -6009,85 +5940,6 @@ COMPILE_ASSERT(offsetof(TexSubImage2D, pixels_shm_offset) == 40, COMPILE_ASSERT(offsetof(TexSubImage2D, internal) == 44, OffsetOf_TexSubImage2D_internal_not_44); -struct TexSubImage2DImmediate { - typedef TexSubImage2DImmediate ValueType; - static const CommandId kCmdId = kTexSubImage2DImmediate; - static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; - - static uint32 ComputeSize(uint32 size_in_bytes) { - return static_cast<uint32>( - sizeof(ValueType) + // NOLINT - RoundSizeToMultipleOfEntries(size_in_bytes)); - } - - void SetHeader(uint32 size_in_bytes) { - header.SetCmdByTotalSize<ValueType>(size_in_bytes); - } - - void Init( - GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLenum _type, - GLboolean _internal) { - uint32 total_size = 0; // TODO(gman): get correct size. - SetHeader(total_size); - target = _target; - level = _level; - xoffset = _xoffset; - yoffset = _yoffset; - width = _width; - height = _height; - format = _format; - type = _type; - internal = _internal; - } - - void* Set( - void* cmd, GLenum _target, GLint _level, GLint _xoffset, GLint _yoffset, - GLsizei _width, GLsizei _height, GLenum _format, GLenum _type, - GLboolean _internal) { - uint32 total_size = 0; // TODO(gman): get correct size. - static_cast<ValueType*>( - cmd)->Init( - _target, _level, _xoffset, _yoffset, _width, _height, _format, - _type, _internal); - return NextImmediateCmdAddressTotalSize<ValueType>(cmd, total_size); - } - - gpu::CommandHeader header; - uint32 target; - int32 level; - int32 xoffset; - int32 yoffset; - int32 width; - int32 height; - uint32 format; - uint32 type; - uint32 internal; -}; - -COMPILE_ASSERT(sizeof(TexSubImage2DImmediate) == 40, - Sizeof_TexSubImage2DImmediate_is_not_40); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, header) == 0, - OffsetOf_TexSubImage2DImmediate_header_not_0); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, target) == 4, - OffsetOf_TexSubImage2DImmediate_target_not_4); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, level) == 8, - OffsetOf_TexSubImage2DImmediate_level_not_8); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, xoffset) == 12, - OffsetOf_TexSubImage2DImmediate_xoffset_not_12); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, yoffset) == 16, - OffsetOf_TexSubImage2DImmediate_yoffset_not_16); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, width) == 20, - OffsetOf_TexSubImage2DImmediate_width_not_20); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, height) == 24, - OffsetOf_TexSubImage2DImmediate_height_not_24); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, format) == 28, - OffsetOf_TexSubImage2DImmediate_format_not_28); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, type) == 32, - OffsetOf_TexSubImage2DImmediate_type_not_32); -COMPILE_ASSERT(offsetof(TexSubImage2DImmediate, internal) == 36, - OffsetOf_TexSubImage2DImmediate_internal_not_36); - struct Uniform1f { typedef Uniform1f ValueType; static const CommandId kCmdId = kUniform1f; diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h index 2f1c800..451bb88 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h @@ -431,7 +431,6 @@ TEST_F(GLES2FormatTest, CompressedTexImage2D) { next_cmd, sizeof(cmd)); } -// TODO(gman): Implement test for CompressedTexImage2DImmediate TEST_F(GLES2FormatTest, CompressedTexImage2DBucket) { cmds::CompressedTexImage2DBucket& cmd = *GetBufferAs<cmds::CompressedTexImage2DBucket>(); @@ -2234,7 +2233,6 @@ TEST_F(GLES2FormatTest, TexSubImage2D) { next_cmd, sizeof(cmd)); } -// TODO(gman): Implement test for TexSubImage2DImmediate TEST_F(GLES2FormatTest, Uniform1f) { cmds::Uniform1f& cmd = *GetBufferAs<cmds::Uniform1f>(); void* next_cmd = cmd.Set( diff --git a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h index 4812470..b4ee39e 100644 --- a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h @@ -36,223 +36,221 @@ OP(ColorMask) /* 279 */ \ OP(CompileShader) /* 280 */ \ OP(CompressedTexImage2D) /* 281 */ \ - OP(CompressedTexImage2DImmediate) /* 282 */ \ - OP(CompressedTexImage2DBucket) /* 283 */ \ - OP(CompressedTexSubImage2D) /* 284 */ \ - OP(CompressedTexSubImage2DImmediate) /* 285 */ \ - OP(CompressedTexSubImage2DBucket) /* 286 */ \ - OP(CopyTexImage2D) /* 287 */ \ - OP(CopyTexSubImage2D) /* 288 */ \ - OP(CreateProgram) /* 289 */ \ - OP(CreateShader) /* 290 */ \ - OP(CullFace) /* 291 */ \ - OP(DeleteBuffers) /* 292 */ \ - OP(DeleteBuffersImmediate) /* 293 */ \ - OP(DeleteFramebuffers) /* 294 */ \ - OP(DeleteFramebuffersImmediate) /* 295 */ \ - OP(DeleteProgram) /* 296 */ \ - OP(DeleteRenderbuffers) /* 297 */ \ - OP(DeleteRenderbuffersImmediate) /* 298 */ \ - OP(DeleteShader) /* 299 */ \ - OP(DeleteTextures) /* 300 */ \ - OP(DeleteTexturesImmediate) /* 301 */ \ - OP(DepthFunc) /* 302 */ \ - OP(DepthMask) /* 303 */ \ - OP(DepthRangef) /* 304 */ \ - OP(DetachShader) /* 305 */ \ - OP(Disable) /* 306 */ \ - OP(DisableVertexAttribArray) /* 307 */ \ - OP(DrawArrays) /* 308 */ \ - OP(DrawElements) /* 309 */ \ - OP(Enable) /* 310 */ \ - OP(EnableVertexAttribArray) /* 311 */ \ - OP(Finish) /* 312 */ \ - OP(Flush) /* 313 */ \ - OP(FramebufferRenderbuffer) /* 314 */ \ - OP(FramebufferTexture2D) /* 315 */ \ - OP(FrontFace) /* 316 */ \ - OP(GenBuffers) /* 317 */ \ - OP(GenBuffersImmediate) /* 318 */ \ - OP(GenerateMipmap) /* 319 */ \ - OP(GenFramebuffers) /* 320 */ \ - OP(GenFramebuffersImmediate) /* 321 */ \ - OP(GenRenderbuffers) /* 322 */ \ - OP(GenRenderbuffersImmediate) /* 323 */ \ - OP(GenTextures) /* 324 */ \ - OP(GenTexturesImmediate) /* 325 */ \ - OP(GetActiveAttrib) /* 326 */ \ - OP(GetActiveUniform) /* 327 */ \ - OP(GetAttachedShaders) /* 328 */ \ - OP(GetAttribLocation) /* 329 */ \ - OP(GetAttribLocationImmediate) /* 330 */ \ - OP(GetAttribLocationBucket) /* 331 */ \ - OP(GetBooleanv) /* 332 */ \ - OP(GetBufferParameteriv) /* 333 */ \ - OP(GetError) /* 334 */ \ - OP(GetFloatv) /* 335 */ \ - OP(GetFramebufferAttachmentParameteriv) /* 336 */ \ - OP(GetIntegerv) /* 337 */ \ - OP(GetProgramiv) /* 338 */ \ - OP(GetProgramInfoLog) /* 339 */ \ - OP(GetRenderbufferParameteriv) /* 340 */ \ - OP(GetShaderiv) /* 341 */ \ - OP(GetShaderInfoLog) /* 342 */ \ - OP(GetShaderPrecisionFormat) /* 343 */ \ - OP(GetShaderSource) /* 344 */ \ - OP(GetString) /* 345 */ \ - OP(GetTexParameterfv) /* 346 */ \ - OP(GetTexParameteriv) /* 347 */ \ - OP(GetUniformfv) /* 348 */ \ - OP(GetUniformiv) /* 349 */ \ - OP(GetUniformLocation) /* 350 */ \ - OP(GetUniformLocationImmediate) /* 351 */ \ - OP(GetUniformLocationBucket) /* 352 */ \ - OP(GetVertexAttribfv) /* 353 */ \ - OP(GetVertexAttribiv) /* 354 */ \ - OP(GetVertexAttribPointerv) /* 355 */ \ - OP(Hint) /* 356 */ \ - OP(IsBuffer) /* 357 */ \ - OP(IsEnabled) /* 358 */ \ - OP(IsFramebuffer) /* 359 */ \ - OP(IsProgram) /* 360 */ \ - OP(IsRenderbuffer) /* 361 */ \ - OP(IsShader) /* 362 */ \ - OP(IsTexture) /* 363 */ \ - OP(LineWidth) /* 364 */ \ - OP(LinkProgram) /* 365 */ \ - OP(PixelStorei) /* 366 */ \ - OP(PolygonOffset) /* 367 */ \ - OP(ReadPixels) /* 368 */ \ - OP(ReleaseShaderCompiler) /* 369 */ \ - OP(RenderbufferStorage) /* 370 */ \ - OP(SampleCoverage) /* 371 */ \ - OP(Scissor) /* 372 */ \ - OP(ShaderBinary) /* 373 */ \ - OP(ShaderSource) /* 374 */ \ - OP(ShaderSourceImmediate) /* 375 */ \ - OP(ShaderSourceBucket) /* 376 */ \ - OP(StencilFunc) /* 377 */ \ - OP(StencilFuncSeparate) /* 378 */ \ - OP(StencilMask) /* 379 */ \ - OP(StencilMaskSeparate) /* 380 */ \ - OP(StencilOp) /* 381 */ \ - OP(StencilOpSeparate) /* 382 */ \ - OP(TexImage2D) /* 383 */ \ - OP(TexParameterf) /* 384 */ \ - OP(TexParameterfv) /* 385 */ \ - OP(TexParameterfvImmediate) /* 386 */ \ - OP(TexParameteri) /* 387 */ \ - OP(TexParameteriv) /* 388 */ \ - OP(TexParameterivImmediate) /* 389 */ \ - OP(TexSubImage2D) /* 390 */ \ - OP(TexSubImage2DImmediate) /* 391 */ \ - OP(Uniform1f) /* 392 */ \ - OP(Uniform1fv) /* 393 */ \ - OP(Uniform1fvImmediate) /* 394 */ \ - OP(Uniform1i) /* 395 */ \ - OP(Uniform1iv) /* 396 */ \ - OP(Uniform1ivImmediate) /* 397 */ \ - OP(Uniform2f) /* 398 */ \ - OP(Uniform2fv) /* 399 */ \ - OP(Uniform2fvImmediate) /* 400 */ \ - OP(Uniform2i) /* 401 */ \ - OP(Uniform2iv) /* 402 */ \ - OP(Uniform2ivImmediate) /* 403 */ \ - OP(Uniform3f) /* 404 */ \ - OP(Uniform3fv) /* 405 */ \ - OP(Uniform3fvImmediate) /* 406 */ \ - OP(Uniform3i) /* 407 */ \ - OP(Uniform3iv) /* 408 */ \ - OP(Uniform3ivImmediate) /* 409 */ \ - OP(Uniform4f) /* 410 */ \ - OP(Uniform4fv) /* 411 */ \ - OP(Uniform4fvImmediate) /* 412 */ \ - OP(Uniform4i) /* 413 */ \ - OP(Uniform4iv) /* 414 */ \ - OP(Uniform4ivImmediate) /* 415 */ \ - OP(UniformMatrix2fv) /* 416 */ \ - OP(UniformMatrix2fvImmediate) /* 417 */ \ - OP(UniformMatrix3fv) /* 418 */ \ - OP(UniformMatrix3fvImmediate) /* 419 */ \ - OP(UniformMatrix4fv) /* 420 */ \ - OP(UniformMatrix4fvImmediate) /* 421 */ \ - OP(UseProgram) /* 422 */ \ - OP(ValidateProgram) /* 423 */ \ - OP(VertexAttrib1f) /* 424 */ \ - OP(VertexAttrib1fv) /* 425 */ \ - OP(VertexAttrib1fvImmediate) /* 426 */ \ - OP(VertexAttrib2f) /* 427 */ \ - OP(VertexAttrib2fv) /* 428 */ \ - OP(VertexAttrib2fvImmediate) /* 429 */ \ - OP(VertexAttrib3f) /* 430 */ \ - OP(VertexAttrib3fv) /* 431 */ \ - OP(VertexAttrib3fvImmediate) /* 432 */ \ - OP(VertexAttrib4f) /* 433 */ \ - OP(VertexAttrib4fv) /* 434 */ \ - OP(VertexAttrib4fvImmediate) /* 435 */ \ - OP(VertexAttribPointer) /* 436 */ \ - OP(Viewport) /* 437 */ \ - OP(BlitFramebufferEXT) /* 438 */ \ - OP(RenderbufferStorageMultisampleEXT) /* 439 */ \ - OP(FramebufferTexture2DMultisampleEXT) /* 440 */ \ - OP(TexStorage2DEXT) /* 441 */ \ - OP(GenQueriesEXT) /* 442 */ \ - OP(GenQueriesEXTImmediate) /* 443 */ \ - OP(DeleteQueriesEXT) /* 444 */ \ - OP(DeleteQueriesEXTImmediate) /* 445 */ \ - OP(BeginQueryEXT) /* 446 */ \ - OP(EndQueryEXT) /* 447 */ \ - OP(InsertEventMarkerEXT) /* 448 */ \ - OP(PushGroupMarkerEXT) /* 449 */ \ - OP(PopGroupMarkerEXT) /* 450 */ \ - OP(GenVertexArraysOES) /* 451 */ \ - OP(GenVertexArraysOESImmediate) /* 452 */ \ - OP(DeleteVertexArraysOES) /* 453 */ \ - OP(DeleteVertexArraysOESImmediate) /* 454 */ \ - OP(IsVertexArrayOES) /* 455 */ \ - OP(BindVertexArrayOES) /* 456 */ \ - OP(SwapBuffers) /* 457 */ \ - OP(GetMaxValueInBufferCHROMIUM) /* 458 */ \ - OP(GenSharedIdsCHROMIUM) /* 459 */ \ - OP(DeleteSharedIdsCHROMIUM) /* 460 */ \ - OP(RegisterSharedIdsCHROMIUM) /* 461 */ \ - OP(EnableFeatureCHROMIUM) /* 462 */ \ - OP(ResizeCHROMIUM) /* 463 */ \ - OP(GetRequestableExtensionsCHROMIUM) /* 464 */ \ - OP(RequestExtensionCHROMIUM) /* 465 */ \ - OP(GetMultipleIntegervCHROMIUM) /* 466 */ \ - OP(GetProgramInfoCHROMIUM) /* 467 */ \ - OP(CreateStreamTextureCHROMIUM) /* 468 */ \ - OP(DestroyStreamTextureCHROMIUM) /* 469 */ \ - OP(GetTranslatedShaderSourceANGLE) /* 470 */ \ - OP(PostSubBufferCHROMIUM) /* 471 */ \ - OP(TexImageIOSurface2DCHROMIUM) /* 472 */ \ - OP(CopyTextureCHROMIUM) /* 473 */ \ - OP(DrawArraysInstancedANGLE) /* 474 */ \ - OP(DrawElementsInstancedANGLE) /* 475 */ \ - OP(VertexAttribDivisorANGLE) /* 476 */ \ - OP(GenMailboxCHROMIUM) /* 477 */ \ - OP(ProduceTextureCHROMIUM) /* 478 */ \ - OP(ProduceTextureCHROMIUMImmediate) /* 479 */ \ - OP(ConsumeTextureCHROMIUM) /* 480 */ \ - OP(ConsumeTextureCHROMIUMImmediate) /* 481 */ \ - OP(BindUniformLocationCHROMIUM) /* 482 */ \ - OP(BindUniformLocationCHROMIUMImmediate) /* 483 */ \ - OP(BindUniformLocationCHROMIUMBucket) /* 484 */ \ - OP(BindTexImage2DCHROMIUM) /* 485 */ \ - OP(ReleaseTexImage2DCHROMIUM) /* 486 */ \ - OP(TraceBeginCHROMIUM) /* 487 */ \ - OP(TraceEndCHROMIUM) /* 488 */ \ - OP(AsyncTexSubImage2DCHROMIUM) /* 489 */ \ - OP(AsyncTexImage2DCHROMIUM) /* 490 */ \ - OP(WaitAsyncTexImage2DCHROMIUM) /* 491 */ \ - OP(DiscardFramebufferEXT) /* 492 */ \ - OP(DiscardFramebufferEXTImmediate) /* 493 */ \ - OP(LoseContextCHROMIUM) /* 494 */ \ - OP(InsertSyncPointCHROMIUM) /* 495 */ \ - OP(WaitSyncPointCHROMIUM) /* 496 */ \ - OP(DrawBuffersEXT) /* 497 */ \ - OP(DrawBuffersEXTImmediate) /* 498 */ \ + OP(CompressedTexImage2DBucket) /* 282 */ \ + OP(CompressedTexSubImage2D) /* 283 */ \ + OP(CompressedTexSubImage2DImmediate) /* 284 */ \ + OP(CompressedTexSubImage2DBucket) /* 285 */ \ + OP(CopyTexImage2D) /* 286 */ \ + OP(CopyTexSubImage2D) /* 287 */ \ + OP(CreateProgram) /* 288 */ \ + OP(CreateShader) /* 289 */ \ + OP(CullFace) /* 290 */ \ + OP(DeleteBuffers) /* 291 */ \ + OP(DeleteBuffersImmediate) /* 292 */ \ + OP(DeleteFramebuffers) /* 293 */ \ + OP(DeleteFramebuffersImmediate) /* 294 */ \ + OP(DeleteProgram) /* 295 */ \ + OP(DeleteRenderbuffers) /* 296 */ \ + OP(DeleteRenderbuffersImmediate) /* 297 */ \ + OP(DeleteShader) /* 298 */ \ + OP(DeleteTextures) /* 299 */ \ + OP(DeleteTexturesImmediate) /* 300 */ \ + OP(DepthFunc) /* 301 */ \ + OP(DepthMask) /* 302 */ \ + OP(DepthRangef) /* 303 */ \ + OP(DetachShader) /* 304 */ \ + OP(Disable) /* 305 */ \ + OP(DisableVertexAttribArray) /* 306 */ \ + OP(DrawArrays) /* 307 */ \ + OP(DrawElements) /* 308 */ \ + OP(Enable) /* 309 */ \ + OP(EnableVertexAttribArray) /* 310 */ \ + OP(Finish) /* 311 */ \ + OP(Flush) /* 312 */ \ + OP(FramebufferRenderbuffer) /* 313 */ \ + OP(FramebufferTexture2D) /* 314 */ \ + OP(FrontFace) /* 315 */ \ + OP(GenBuffers) /* 316 */ \ + OP(GenBuffersImmediate) /* 317 */ \ + OP(GenerateMipmap) /* 318 */ \ + OP(GenFramebuffers) /* 319 */ \ + OP(GenFramebuffersImmediate) /* 320 */ \ + OP(GenRenderbuffers) /* 321 */ \ + OP(GenRenderbuffersImmediate) /* 322 */ \ + OP(GenTextures) /* 323 */ \ + OP(GenTexturesImmediate) /* 324 */ \ + OP(GetActiveAttrib) /* 325 */ \ + OP(GetActiveUniform) /* 326 */ \ + OP(GetAttachedShaders) /* 327 */ \ + OP(GetAttribLocation) /* 328 */ \ + OP(GetAttribLocationImmediate) /* 329 */ \ + OP(GetAttribLocationBucket) /* 330 */ \ + OP(GetBooleanv) /* 331 */ \ + OP(GetBufferParameteriv) /* 332 */ \ + OP(GetError) /* 333 */ \ + OP(GetFloatv) /* 334 */ \ + OP(GetFramebufferAttachmentParameteriv) /* 335 */ \ + OP(GetIntegerv) /* 336 */ \ + OP(GetProgramiv) /* 337 */ \ + OP(GetProgramInfoLog) /* 338 */ \ + OP(GetRenderbufferParameteriv) /* 339 */ \ + OP(GetShaderiv) /* 340 */ \ + OP(GetShaderInfoLog) /* 341 */ \ + OP(GetShaderPrecisionFormat) /* 342 */ \ + OP(GetShaderSource) /* 343 */ \ + OP(GetString) /* 344 */ \ + OP(GetTexParameterfv) /* 345 */ \ + OP(GetTexParameteriv) /* 346 */ \ + OP(GetUniformfv) /* 347 */ \ + OP(GetUniformiv) /* 348 */ \ + OP(GetUniformLocation) /* 349 */ \ + OP(GetUniformLocationImmediate) /* 350 */ \ + OP(GetUniformLocationBucket) /* 351 */ \ + OP(GetVertexAttribfv) /* 352 */ \ + OP(GetVertexAttribiv) /* 353 */ \ + OP(GetVertexAttribPointerv) /* 354 */ \ + OP(Hint) /* 355 */ \ + OP(IsBuffer) /* 356 */ \ + OP(IsEnabled) /* 357 */ \ + OP(IsFramebuffer) /* 358 */ \ + OP(IsProgram) /* 359 */ \ + OP(IsRenderbuffer) /* 360 */ \ + OP(IsShader) /* 361 */ \ + OP(IsTexture) /* 362 */ \ + OP(LineWidth) /* 363 */ \ + OP(LinkProgram) /* 364 */ \ + OP(PixelStorei) /* 365 */ \ + OP(PolygonOffset) /* 366 */ \ + OP(ReadPixels) /* 367 */ \ + OP(ReleaseShaderCompiler) /* 368 */ \ + OP(RenderbufferStorage) /* 369 */ \ + OP(SampleCoverage) /* 370 */ \ + OP(Scissor) /* 371 */ \ + OP(ShaderBinary) /* 372 */ \ + OP(ShaderSource) /* 373 */ \ + OP(ShaderSourceImmediate) /* 374 */ \ + OP(ShaderSourceBucket) /* 375 */ \ + OP(StencilFunc) /* 376 */ \ + OP(StencilFuncSeparate) /* 377 */ \ + OP(StencilMask) /* 378 */ \ + OP(StencilMaskSeparate) /* 379 */ \ + OP(StencilOp) /* 380 */ \ + OP(StencilOpSeparate) /* 381 */ \ + OP(TexImage2D) /* 382 */ \ + OP(TexParameterf) /* 383 */ \ + OP(TexParameterfv) /* 384 */ \ + OP(TexParameterfvImmediate) /* 385 */ \ + OP(TexParameteri) /* 386 */ \ + OP(TexParameteriv) /* 387 */ \ + OP(TexParameterivImmediate) /* 388 */ \ + OP(TexSubImage2D) /* 389 */ \ + OP(Uniform1f) /* 390 */ \ + OP(Uniform1fv) /* 391 */ \ + OP(Uniform1fvImmediate) /* 392 */ \ + OP(Uniform1i) /* 393 */ \ + OP(Uniform1iv) /* 394 */ \ + OP(Uniform1ivImmediate) /* 395 */ \ + OP(Uniform2f) /* 396 */ \ + OP(Uniform2fv) /* 397 */ \ + OP(Uniform2fvImmediate) /* 398 */ \ + OP(Uniform2i) /* 399 */ \ + OP(Uniform2iv) /* 400 */ \ + OP(Uniform2ivImmediate) /* 401 */ \ + OP(Uniform3f) /* 402 */ \ + OP(Uniform3fv) /* 403 */ \ + OP(Uniform3fvImmediate) /* 404 */ \ + OP(Uniform3i) /* 405 */ \ + OP(Uniform3iv) /* 406 */ \ + OP(Uniform3ivImmediate) /* 407 */ \ + OP(Uniform4f) /* 408 */ \ + OP(Uniform4fv) /* 409 */ \ + OP(Uniform4fvImmediate) /* 410 */ \ + OP(Uniform4i) /* 411 */ \ + OP(Uniform4iv) /* 412 */ \ + OP(Uniform4ivImmediate) /* 413 */ \ + OP(UniformMatrix2fv) /* 414 */ \ + OP(UniformMatrix2fvImmediate) /* 415 */ \ + OP(UniformMatrix3fv) /* 416 */ \ + OP(UniformMatrix3fvImmediate) /* 417 */ \ + OP(UniformMatrix4fv) /* 418 */ \ + OP(UniformMatrix4fvImmediate) /* 419 */ \ + OP(UseProgram) /* 420 */ \ + OP(ValidateProgram) /* 421 */ \ + OP(VertexAttrib1f) /* 422 */ \ + OP(VertexAttrib1fv) /* 423 */ \ + OP(VertexAttrib1fvImmediate) /* 424 */ \ + OP(VertexAttrib2f) /* 425 */ \ + OP(VertexAttrib2fv) /* 426 */ \ + OP(VertexAttrib2fvImmediate) /* 427 */ \ + OP(VertexAttrib3f) /* 428 */ \ + OP(VertexAttrib3fv) /* 429 */ \ + OP(VertexAttrib3fvImmediate) /* 430 */ \ + OP(VertexAttrib4f) /* 431 */ \ + OP(VertexAttrib4fv) /* 432 */ \ + OP(VertexAttrib4fvImmediate) /* 433 */ \ + OP(VertexAttribPointer) /* 434 */ \ + OP(Viewport) /* 435 */ \ + OP(BlitFramebufferEXT) /* 436 */ \ + OP(RenderbufferStorageMultisampleEXT) /* 437 */ \ + OP(FramebufferTexture2DMultisampleEXT) /* 438 */ \ + OP(TexStorage2DEXT) /* 439 */ \ + OP(GenQueriesEXT) /* 440 */ \ + OP(GenQueriesEXTImmediate) /* 441 */ \ + OP(DeleteQueriesEXT) /* 442 */ \ + OP(DeleteQueriesEXTImmediate) /* 443 */ \ + OP(BeginQueryEXT) /* 444 */ \ + OP(EndQueryEXT) /* 445 */ \ + OP(InsertEventMarkerEXT) /* 446 */ \ + OP(PushGroupMarkerEXT) /* 447 */ \ + OP(PopGroupMarkerEXT) /* 448 */ \ + OP(GenVertexArraysOES) /* 449 */ \ + OP(GenVertexArraysOESImmediate) /* 450 */ \ + OP(DeleteVertexArraysOES) /* 451 */ \ + OP(DeleteVertexArraysOESImmediate) /* 452 */ \ + OP(IsVertexArrayOES) /* 453 */ \ + OP(BindVertexArrayOES) /* 454 */ \ + OP(SwapBuffers) /* 455 */ \ + OP(GetMaxValueInBufferCHROMIUM) /* 456 */ \ + OP(GenSharedIdsCHROMIUM) /* 457 */ \ + OP(DeleteSharedIdsCHROMIUM) /* 458 */ \ + OP(RegisterSharedIdsCHROMIUM) /* 459 */ \ + OP(EnableFeatureCHROMIUM) /* 460 */ \ + OP(ResizeCHROMIUM) /* 461 */ \ + OP(GetRequestableExtensionsCHROMIUM) /* 462 */ \ + OP(RequestExtensionCHROMIUM) /* 463 */ \ + OP(GetMultipleIntegervCHROMIUM) /* 464 */ \ + OP(GetProgramInfoCHROMIUM) /* 465 */ \ + OP(CreateStreamTextureCHROMIUM) /* 466 */ \ + OP(DestroyStreamTextureCHROMIUM) /* 467 */ \ + OP(GetTranslatedShaderSourceANGLE) /* 468 */ \ + OP(PostSubBufferCHROMIUM) /* 469 */ \ + OP(TexImageIOSurface2DCHROMIUM) /* 470 */ \ + OP(CopyTextureCHROMIUM) /* 471 */ \ + OP(DrawArraysInstancedANGLE) /* 472 */ \ + OP(DrawElementsInstancedANGLE) /* 473 */ \ + OP(VertexAttribDivisorANGLE) /* 474 */ \ + OP(GenMailboxCHROMIUM) /* 475 */ \ + OP(ProduceTextureCHROMIUM) /* 476 */ \ + OP(ProduceTextureCHROMIUMImmediate) /* 477 */ \ + OP(ConsumeTextureCHROMIUM) /* 478 */ \ + OP(ConsumeTextureCHROMIUMImmediate) /* 479 */ \ + OP(BindUniformLocationCHROMIUM) /* 480 */ \ + OP(BindUniformLocationCHROMIUMImmediate) /* 481 */ \ + OP(BindUniformLocationCHROMIUMBucket) /* 482 */ \ + OP(BindTexImage2DCHROMIUM) /* 483 */ \ + OP(ReleaseTexImage2DCHROMIUM) /* 484 */ \ + OP(TraceBeginCHROMIUM) /* 485 */ \ + OP(TraceEndCHROMIUM) /* 486 */ \ + OP(AsyncTexSubImage2DCHROMIUM) /* 487 */ \ + OP(AsyncTexImage2DCHROMIUM) /* 488 */ \ + OP(WaitAsyncTexImage2DCHROMIUM) /* 489 */ \ + OP(DiscardFramebufferEXT) /* 490 */ \ + OP(DiscardFramebufferEXTImmediate) /* 491 */ \ + OP(LoseContextCHROMIUM) /* 492 */ \ + OP(InsertSyncPointCHROMIUM) /* 493 */ \ + OP(WaitSyncPointCHROMIUM) /* 494 */ \ + OP(DrawBuffersEXT) /* 495 */ \ + OP(DrawBuffersEXTImmediate) /* 496 */ \ enum CommandId { kStartPoint = cmd::kLastCommonId, // All GLES2 commands start after this. diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index c1ccdff..0a22d7d 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -7761,24 +7761,6 @@ error::Error GLES2DecoderImpl::HandleCompressedTexImage2D( target, level, internal_format, width, height, border, image_size, data); } -error::Error GLES2DecoderImpl::HandleCompressedTexImage2DImmediate( - uint32 immediate_data_size, const cmds::CompressedTexImage2DImmediate& c) { - GLenum target = static_cast<GLenum>(c.target); - GLint level = static_cast<GLint>(c.level); - GLenum internal_format = static_cast<GLenum>(c.internalformat); - GLsizei width = static_cast<GLsizei>(c.width); - GLsizei height = static_cast<GLsizei>(c.height); - GLint border = static_cast<GLint>(c.border); - GLsizei image_size = static_cast<GLsizei>(c.imageSize); - const void* data = GetImmediateDataAs<const void*>( - c, image_size, immediate_data_size); - if (!data) { - return error::kOutOfBounds; - } - return DoCompressedTexImage2D( - target, level, internal_format, width, height, border, image_size, data); -} - error::Error GLES2DecoderImpl::HandleCompressedTexImage2DBucket( uint32 immediate_data_size, const cmds::CompressedTexImage2DBucket& c) { GLenum target = static_cast<GLenum>(c.target); @@ -8356,32 +8338,6 @@ error::Error GLES2DecoderImpl::HandleTexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels); } -error::Error GLES2DecoderImpl::HandleTexSubImage2DImmediate( - uint32 immediate_data_size, const cmds::TexSubImage2DImmediate& c) { - GLboolean internal = static_cast<GLboolean>(c.internal); - if (internal == GL_TRUE && texture_state_.tex_image_2d_failed) - return error::kNoError; - - GLenum target = static_cast<GLenum>(c.target); - GLint level = static_cast<GLint>(c.level); - GLint xoffset = static_cast<GLint>(c.xoffset); - GLint yoffset = static_cast<GLint>(c.yoffset); - GLsizei width = static_cast<GLsizei>(c.width); - GLsizei height = static_cast<GLsizei>(c.height); - GLenum format = static_cast<GLenum>(c.format); - GLenum type = static_cast<GLenum>(c.type); - uint32 data_size; - if (!GLES2Util::ComputeImageDataSizes( - width, height, format, type, state_.unpack_alignment, &data_size, - NULL, NULL)) { - return error::kOutOfBounds; - } - const void* pixels = GetImmediateDataAs<const void*>( - c, data_size, immediate_data_size); - return DoTexSubImage2D( - target, level, xoffset, yoffset, width, height, format, type, pixels); -} - error::Error GLES2DecoderImpl::HandleGetVertexAttribPointerv( uint32 immediate_data_size, const cmds::GetVertexAttribPointerv& c) { GLuint index = static_cast<GLuint>(c.index); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc index daa98ae..3ca4d5c 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc @@ -267,6 +267,19 @@ void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribfv, 0>( } }; +template <> +void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribiv, 0>( + bool valid) { + DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId); + DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0); + if (valid) { + EXPECT_CALL(*gl_, GetError()) + .WillOnce(Return(GL_NO_ERROR)) + .WillOnce(Return(GL_NO_ERROR)) + .RetiresOnSaturation(); + } +}; + #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" } // namespace gles2 diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h index bb4b8c8..8076743 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h @@ -355,8 +355,6 @@ TEST_F(GLES2DecoderTest1, ColorMaskValidArgs) { // TODO(gman): CompileShader // TODO(gman): CompressedTexImage2D -// TODO(gman): CompressedTexImage2DImmediate - // TODO(gman): CompressedTexImage2DBucket // TODO(gman): CompressedTexSubImage2D @@ -1865,5 +1863,47 @@ TEST_F(GLES2DecoderTest1, GetVertexAttribfvInvalidArgs2_1) { EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); EXPECT_EQ(0u, result->size); } + +TEST_F(GLES2DecoderTest1, GetVertexAttribivValidArgs) { + SpecializedSetup<cmds::GetVertexAttribiv, 0>(true); + typedef cmds::GetVertexAttribiv::Result Result; + Result* result = static_cast<Result*>(shared_memory_address_); + result->size = 0; + cmds::GetVertexAttribiv cmd; + cmd.Init( + 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_, + shared_memory_offset_); + EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); + EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED), + result->GetNumResults()); + EXPECT_EQ(GL_NO_ERROR, GetGLError()); +} + +TEST_F(GLES2DecoderTest1, GetVertexAttribivInvalidArgs2_0) { + EXPECT_CALL(*gl_, GetVertexAttribiv(_, _, _)).Times(0); + SpecializedSetup<cmds::GetVertexAttribiv, 0>(false); + cmds::GetVertexAttribiv::Result* result = + static_cast<cmds::GetVertexAttribiv::Result*>(shared_memory_address_); + result->size = 0; + cmds::GetVertexAttribiv cmd; + cmd.Init(1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, kInvalidSharedMemoryId, 0); + EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); + EXPECT_EQ(0u, result->size); +} + +TEST_F(GLES2DecoderTest1, GetVertexAttribivInvalidArgs2_1) { + EXPECT_CALL(*gl_, GetVertexAttribiv(_, _, _)).Times(0); + SpecializedSetup<cmds::GetVertexAttribiv, 0>(false); + cmds::GetVertexAttribiv::Result* result = + static_cast<cmds::GetVertexAttribiv::Result*>(shared_memory_address_); + result->size = 0; + cmds::GetVertexAttribiv cmd; + cmd.Init( + 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_, + kInvalidSharedMemoryOffset); + EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); + EXPECT_EQ(0u, result->size); +} #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_ diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc index 12d96c2..8c9c6ec 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc @@ -382,19 +382,6 @@ void GLES2DecoderTestBase::SpecializedSetup<cmds::TexParameterivImmediate, 0>( DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); }; -template <> -void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribiv, 0>( - bool valid) { - DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId); - DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0); - if (valid) { - EXPECT_CALL(*gl_, GetError()) - .WillOnce(Return(GL_NO_ERROR)) - .WillOnce(Return(GL_NO_ERROR)) - .RetiresOnSaturation(); - } -}; - #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h" } // namespace gles2 diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h index 6610d15..142514c 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h @@ -10,48 +10,6 @@ #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ - -TEST_F(GLES2DecoderTest2, GetVertexAttribivValidArgs) { - SpecializedSetup<cmds::GetVertexAttribiv, 0>(true); - typedef cmds::GetVertexAttribiv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - result->size = 0; - cmds::GetVertexAttribiv cmd; - cmd.Init( - 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_, - shared_memory_offset_); - EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( - GL_VERTEX_ATTRIB_ARRAY_NORMALIZED), - result->GetNumResults()); - EXPECT_EQ(GL_NO_ERROR, GetGLError()); -} - -TEST_F(GLES2DecoderTest2, GetVertexAttribivInvalidArgs2_0) { - EXPECT_CALL(*gl_, GetVertexAttribiv(_, _, _)).Times(0); - SpecializedSetup<cmds::GetVertexAttribiv, 0>(false); - cmds::GetVertexAttribiv::Result* result = - static_cast<cmds::GetVertexAttribiv::Result*>(shared_memory_address_); - result->size = 0; - cmds::GetVertexAttribiv cmd; - cmd.Init(1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, kInvalidSharedMemoryId, 0); - EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); - EXPECT_EQ(0u, result->size); -} - -TEST_F(GLES2DecoderTest2, GetVertexAttribivInvalidArgs2_1) { - EXPECT_CALL(*gl_, GetVertexAttribiv(_, _, _)).Times(0); - SpecializedSetup<cmds::GetVertexAttribiv, 0>(false); - cmds::GetVertexAttribiv::Result* result = - static_cast<cmds::GetVertexAttribiv::Result*>(shared_memory_address_); - result->size = 0; - cmds::GetVertexAttribiv cmd; - cmd.Init( - 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_, - kInvalidSharedMemoryOffset); - EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); - EXPECT_EQ(0u, result->size); -} // TODO(gman): GetVertexAttribPointerv @@ -705,8 +663,6 @@ TEST_F(GLES2DecoderTest2, TexParameterivImmediateInvalidArgs1_0) { } // TODO(gman): TexSubImage2D -// TODO(gman): TexSubImage2DImmediate - TEST_F(GLES2DecoderTest2, Uniform1fValidArgs) { EXPECT_CALL(*gl_, Uniform1fv(1, 1, _)); @@ -1762,5 +1718,7 @@ TEST_F(GLES2DecoderTest2, PopGroupMarkerEXTValidArgs) { EXPECT_EQ(GL_NO_ERROR, GetGLError()); } // TODO(gman): GenVertexArraysOES +// TODO(gman): GenVertexArraysOESImmediate +// TODO(gman): DeleteVertexArraysOES #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h index 3094529..e361a3b 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h @@ -10,8 +10,6 @@ #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_ -// TODO(gman): GenVertexArraysOESImmediate -// TODO(gman): DeleteVertexArraysOES // TODO(gman): DeleteVertexArraysOESImmediate // TODO(gman): IsVertexArrayOES // TODO(gman): BindVertexArrayOES |