Index: gpu/command_buffer/common/gles2_cmd_utils.cc |
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc |
index e0ca1ecc650ab81fa3746dde630b9dbb7297c856..a4c66e336abedab01fbb4ab672d8a09d6c5aa45e 100644 |
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc |
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc |
@@ -808,6 +808,27 @@ size_t GLES2Util::GLTargetToFaceIndex(uint32 target) { |
} |
} |
+uint32_t GLES2Util::GLTextureTargetToBindingTarget(uint32_t textarget) { |
+ switch (textarget) { |
+ case GL_TEXTURE_2D: |
+ case GL_TEXTURE_EXTERNAL_OES: |
+ case GL_TEXTURE_RECTANGLE_ARB: |
+ case GL_TEXTURE_3D: |
+ case GL_TEXTURE_2D_ARRAY: |
+ return textarget; |
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X: |
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: |
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: |
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: |
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: |
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: |
+ return GL_TEXTURE_CUBE_MAP; |
+ default: |
+ NOTREACHED(); |
+ return GL_TEXTURE_2D; |
+ } |
+} |
+ |
uint32 GLES2Util::GetPreferredGLReadPixelsFormat(uint32 internal_format) { |
switch (internal_format) { |
case GL_RGB16F_EXT: |