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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 1275773003: gpu: support GL_TEXTURE_CUBE_MAP destination target to Copy(Sub)TextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Choose correct and expensive way Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698