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 // This file is here so other GLES2 related files can have a common set of | 5 // This file is here so other GLES2 related files can have a common set of |
6 // includes where appropriate. | 6 // includes where appropriate. |
7 | 7 |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: | 225 case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: |
226 return 1; | 226 return 1; |
227 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: | 227 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: |
228 return 1; | 228 return 1; |
229 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: | 229 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: |
230 return 1; | 230 return 1; |
231 // -- glGetFramebufferAttachmentParameteriv with | 231 // -- glGetFramebufferAttachmentParameteriv with |
232 // GL_EXT_multisampled_render_to_texture | 232 // GL_EXT_multisampled_render_to_texture |
233 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT: | 233 case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT: |
234 return 1; | 234 return 1; |
| 235 case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: |
| 236 return 1; |
235 | 237 |
236 // -- glGetProgramiv | 238 // -- glGetProgramiv |
237 case GL_DELETE_STATUS: | 239 case GL_DELETE_STATUS: |
238 return 1; | 240 return 1; |
239 case GL_LINK_STATUS: | 241 case GL_LINK_STATUS: |
240 return 1; | 242 return 1; |
241 case GL_VALIDATE_STATUS: | 243 case GL_VALIDATE_STATUS: |
242 return 1; | 244 return 1; |
243 case GL_INFO_LOG_LENGTH: | 245 case GL_INFO_LOG_LENGTH: |
244 return 1; | 246 return 1; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 case GL_RGB5_A1: | 464 case GL_RGB5_A1: |
463 case GL_DEPTH_COMPONENT16: | 465 case GL_DEPTH_COMPONENT16: |
464 return 2; | 466 return 2; |
465 case GL_RGB: | 467 case GL_RGB: |
466 case GL_RGBA: | 468 case GL_RGBA: |
467 case GL_DEPTH24_STENCIL8_OES: | 469 case GL_DEPTH24_STENCIL8_OES: |
468 case GL_RGB8_OES: | 470 case GL_RGB8_OES: |
469 case GL_RGBA8_OES: | 471 case GL_RGBA8_OES: |
470 case GL_DEPTH_COMPONENT24_OES: | 472 case GL_DEPTH_COMPONENT24_OES: |
471 return 4; | 473 return 4; |
| 474 case GL_RGB16F_EXT: |
| 475 return 6; |
| 476 case GL_RGBA16F_EXT: |
| 477 return 8; |
| 478 case GL_RGB32F_EXT: |
| 479 return 12; |
| 480 case GL_RGBA32F_EXT: |
| 481 return 16; |
472 default: | 482 default: |
473 return 0; | 483 return 0; |
474 } | 484 } |
475 } | 485 } |
476 | 486 |
477 uint32 GLES2Util::GetGLDataTypeSizeForUniforms(int type) { | 487 uint32 GLES2Util::GetGLDataTypeSizeForUniforms(int type) { |
478 switch (type) { | 488 switch (type) { |
479 case GL_FLOAT: | 489 case GL_FLOAT: |
480 return sizeof(GLfloat); // NOLINT | 490 return sizeof(GLfloat); // NOLINT |
481 case GL_FLOAT_VEC2: | 491 case GL_FLOAT_VEC2: |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 } | 814 } |
805 | 815 |
806 return true; | 816 return true; |
807 } | 817 } |
808 | 818 |
809 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" | 819 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" |
810 | 820 |
811 } // namespace gles2 | 821 } // namespace gles2 |
812 } // namespace gpu | 822 } // namespace gpu |
813 | 823 |
OLD | NEW |