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

Side by Side 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 unified diff | Download patch
OLDNEW
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 <sstream> 8 #include <sstream>
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: 802 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
803 return 4; 803 return 4;
804 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: 804 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
805 return 5; 805 return 5;
806 default: 806 default:
807 NOTREACHED(); 807 NOTREACHED();
808 return 0; 808 return 0;
809 } 809 }
810 } 810 }
811 811
812 uint32_t GLES2Util::GLTextureTargetToBindingTarget(uint32_t textarget) {
813 switch (textarget) {
814 case GL_TEXTURE_2D:
815 case GL_TEXTURE_EXTERNAL_OES:
816 case GL_TEXTURE_RECTANGLE_ARB:
817 case GL_TEXTURE_3D:
818 case GL_TEXTURE_2D_ARRAY:
819 return textarget;
820 case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
821 case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
822 case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
823 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
824 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
825 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
826 return GL_TEXTURE_CUBE_MAP;
827 default:
828 NOTREACHED();
829 return GL_TEXTURE_2D;
830 }
831 }
832
812 uint32 GLES2Util::GetGLReadPixelsImplementationFormat( 833 uint32 GLES2Util::GetGLReadPixelsImplementationFormat(
813 uint32 internal_format) { 834 uint32 internal_format) {
814 switch (internal_format) { 835 switch (internal_format) {
815 case GL_R8: 836 case GL_R8:
816 case GL_R16F: 837 case GL_R16F:
817 case GL_R32F: 838 case GL_R32F:
818 return GL_RED; 839 return GL_RED;
819 case GL_R8UI: 840 case GL_R8UI:
820 case GL_R8I: 841 case GL_R8I:
821 case GL_R16UI: 842 case GL_R16UI:
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 } 1369 }
1349 1370
1350 return true; 1371 return true;
1351 } 1372 }
1352 1373
1353 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1374 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1354 1375
1355 } // namespace gles2 1376 } // namespace gles2
1356 } // namespace gpu 1377 } // namespace gpu
1357 1378
OLDNEW
« 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