OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
7 | 7 |
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
10 #include "gpu/command_buffer/service/buffer_manager.h" | 10 #include "gpu/command_buffer/service/buffer_manager.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 QueryManager::Query* GetQueryInfo(GLuint client_id) { | 130 QueryManager::Query* GetQueryInfo(GLuint client_id) { |
131 return decoder_->GetQueryManager()->GetQuery(client_id); | 131 return decoder_->GetQueryManager()->GetQuery(client_id); |
132 } | 132 } |
133 | 133 |
134 bool GetSamplerServiceId(GLuint client_id, GLuint* service_id) const { | 134 bool GetSamplerServiceId(GLuint client_id, GLuint* service_id) const { |
135 return group_->GetSamplerServiceId(client_id, service_id); | 135 return group_->GetSamplerServiceId(client_id, service_id); |
136 } | 136 } |
137 | 137 |
| 138 bool GetTransformFeedbackServiceId( |
| 139 GLuint client_id, GLuint* service_id) const { |
| 140 return group_->GetTransformFeedbackServiceId(client_id, service_id); |
| 141 } |
| 142 |
138 // This name doesn't match the underlying function, but doing it this way | 143 // This name doesn't match the underlying function, but doing it this way |
139 // prevents the need to special-case the unit test generation | 144 // prevents the need to special-case the unit test generation |
140 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { | 145 VertexAttribManager* GetVertexArrayInfo(GLuint client_id) { |
141 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); | 146 return decoder_->GetVertexArrayManager()->GetVertexAttribManager(client_id); |
142 } | 147 } |
143 | 148 |
144 ProgramManager* program_manager() { | 149 ProgramManager* program_manager() { |
145 return group_->program_manager(); | 150 return group_->program_manager(); |
146 } | 151 } |
147 | 152 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 static const GLuint kServiceBufferId = 301; | 434 static const GLuint kServiceBufferId = 301; |
430 static const GLuint kServiceFramebufferId = 302; | 435 static const GLuint kServiceFramebufferId = 302; |
431 static const GLuint kServiceRenderbufferId = 303; | 436 static const GLuint kServiceRenderbufferId = 303; |
432 static const GLuint kServiceTextureId = 304; | 437 static const GLuint kServiceTextureId = 304; |
433 static const GLuint kServiceProgramId = 305; | 438 static const GLuint kServiceProgramId = 305; |
434 static const GLuint kServiceSamplerId = 306; | 439 static const GLuint kServiceSamplerId = 306; |
435 static const GLuint kServiceShaderId = 307; | 440 static const GLuint kServiceShaderId = 307; |
436 static const GLuint kServiceElementBufferId = 308; | 441 static const GLuint kServiceElementBufferId = 308; |
437 static const GLuint kServiceQueryId = 309; | 442 static const GLuint kServiceQueryId = 309; |
438 static const GLuint kServiceVertexArrayId = 310; | 443 static const GLuint kServiceVertexArrayId = 310; |
| 444 static const GLuint kServiceTransformFeedbackId = 311; |
439 | 445 |
440 static const int32 kSharedMemoryId = 401; | 446 static const int32 kSharedMemoryId = 401; |
441 static const size_t kSharedBufferSize = 2048; | 447 static const size_t kSharedBufferSize = 2048; |
442 static const uint32 kSharedMemoryOffset = 132; | 448 static const uint32 kSharedMemoryOffset = 132; |
443 static const int32 kInvalidSharedMemoryId = 402; | 449 static const int32 kInvalidSharedMemoryId = 402; |
444 static const uint32 kInvalidSharedMemoryOffset = kSharedBufferSize + 1; | 450 static const uint32 kInvalidSharedMemoryOffset = kSharedBufferSize + 1; |
445 static const uint32 kInitialResult = 0xBDBDBDBDu; | 451 static const uint32 kInitialResult = 0xBDBDBDBDu; |
446 static const uint8 kInitialMemoryValue = 0xBDu; | 452 static const uint8 kInitialMemoryValue = 0xBDu; |
447 | 453 |
448 static const uint32 kNewClientId = 501; | 454 static const uint32 kNewClientId = 501; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 GLuint client_renderbuffer_id_; | 533 GLuint client_renderbuffer_id_; |
528 GLuint client_sampler_id_; | 534 GLuint client_sampler_id_; |
529 GLuint client_shader_id_; | 535 GLuint client_shader_id_; |
530 GLuint client_texture_id_; | 536 GLuint client_texture_id_; |
531 GLuint client_element_buffer_id_; | 537 GLuint client_element_buffer_id_; |
532 GLuint client_vertex_shader_id_; | 538 GLuint client_vertex_shader_id_; |
533 GLuint client_fragment_shader_id_; | 539 GLuint client_fragment_shader_id_; |
534 GLuint client_query_id_; | 540 GLuint client_query_id_; |
535 GLuint client_vertexarray_id_; | 541 GLuint client_vertexarray_id_; |
536 GLuint client_valuebuffer_id_; | 542 GLuint client_valuebuffer_id_; |
| 543 GLuint client_transformfeedback_id_; |
537 | 544 |
538 uint32 shared_memory_id_; | 545 uint32 shared_memory_id_; |
539 uint32 shared_memory_offset_; | 546 uint32 shared_memory_offset_; |
540 void* shared_memory_address_; | 547 void* shared_memory_address_; |
541 void* shared_memory_base_; | 548 void* shared_memory_base_; |
542 | 549 |
543 GLuint service_renderbuffer_id_; | 550 GLuint service_renderbuffer_id_; |
544 bool service_renderbuffer_valid_; | 551 bool service_renderbuffer_valid_; |
545 | 552 |
546 uint32 immediate_buffer_[64]; | 553 uint32 immediate_buffer_[64]; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 }; | 659 }; |
653 | 660 |
654 // SpecializedSetup specializations that are needed in multiple unittest files. | 661 // SpecializedSetup specializations that are needed in multiple unittest files. |
655 template <> | 662 template <> |
656 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); | 663 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); |
657 | 664 |
658 } // namespace gles2 | 665 } // namespace gles2 |
659 } // namespace gpu | 666 } // namespace gpu |
660 | 667 |
661 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 668 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |