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

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: add comments about crbug.com/528145 Created 5 years, 3 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 e30e2e38c74705a99d7b14f1f8acabaa8a0aac26..098a9eed5965e7255926ac1647bdd165670fea19 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -809,6 +809,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::GetGLReadPixelsImplementationFormat(
uint32 internal_format) {
switch (internal_format) {
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698