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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 case GL_LUMINANCE: 704 case GL_LUMINANCE:
705 return kRGB; 705 return kRGB;
706 case GL_LUMINANCE_ALPHA: 706 case GL_LUMINANCE_ALPHA:
707 return kRGBA; 707 return kRGBA;
708 case GL_RGB: 708 case GL_RGB:
709 case GL_RGB8_OES: 709 case GL_RGB8_OES:
710 case GL_RGB565: 710 case GL_RGB565:
711 case GL_RGB16F_EXT: 711 case GL_RGB16F_EXT:
712 case GL_RGB32F_EXT: 712 case GL_RGB32F_EXT:
713 case GL_SRGB_EXT: 713 case GL_SRGB_EXT:
714 case GL_SRGB8:
715 case GL_RGB8_SNORM:
716 case GL_R11F_G11F_B10F:
717 case GL_RGB9_E5:
718 case GL_RGB8UI:
719 case GL_RGB8I:
720 case GL_RGB16UI:
721 case GL_RGB16I:
722 case GL_RGB32UI:
723 case GL_RGB32I:
714 return kRGB; 724 return kRGB;
715 case GL_BGRA_EXT: 725 case GL_BGRA_EXT:
716 case GL_BGRA8_EXT: 726 case GL_BGRA8_EXT:
717 case GL_RGBA16F_EXT: 727 case GL_RGBA16F_EXT:
718 case GL_RGBA32F_EXT: 728 case GL_RGBA32F_EXT:
719 case GL_RGBA: 729 case GL_RGBA:
720 case GL_RGBA8_OES: 730 case GL_RGBA8_OES:
721 case GL_RGBA4: 731 case GL_RGBA4:
722 case GL_RGB5_A1: 732 case GL_RGB5_A1:
723 case GL_SRGB_ALPHA_EXT: 733 case GL_SRGB_ALPHA_EXT:
724 case GL_SRGB8_ALPHA8_EXT: 734 case GL_SRGB8_ALPHA8_EXT:
735 case GL_RGBA8_SNORM:
736 case GL_RGB10_A2:
737 case GL_RGBA8UI:
738 case GL_RGBA8I:
739 case GL_RGB10_A2UI:
740 case GL_RGBA16UI:
741 case GL_RGBA16I:
742 case GL_RGBA32UI:
743 case GL_RGBA32I:
725 return kRGBA; 744 return kRGBA;
726 case GL_DEPTH_COMPONENT32_OES: 745 case GL_DEPTH_COMPONENT32_OES:
727 case GL_DEPTH_COMPONENT24_OES: 746 case GL_DEPTH_COMPONENT24_OES:
728 case GL_DEPTH_COMPONENT16: 747 case GL_DEPTH_COMPONENT16:
729 case GL_DEPTH_COMPONENT: 748 case GL_DEPTH_COMPONENT:
749 case GL_DEPTH_COMPONENT32F:
730 return kDepth; 750 return kDepth;
731 case GL_STENCIL_INDEX8: 751 case GL_STENCIL_INDEX8:
732 return kStencil; 752 return kStencil;
733 case GL_DEPTH_STENCIL_OES: 753 case GL_DEPTH_STENCIL_OES:
734 case GL_DEPTH24_STENCIL8_OES: 754 case GL_DEPTH24_STENCIL8_OES:
755 case GL_DEPTH32F_STENCIL8:
735 return kDepth | kStencil; 756 return kDepth | kStencil;
736 case GL_RED_EXT: 757 case GL_RED_EXT:
758 case GL_R8:
759 case GL_R8_SNORM:
760 case GL_R16F:
761 case GL_R32F:
762 case GL_R8UI:
763 case GL_R8I:
764 case GL_R16UI:
765 case GL_R16I:
766 case GL_R32UI:
767 case GL_R32I:
737 return kRed; 768 return kRed;
738 case GL_RG_EXT: 769 case GL_RG_EXT:
770 case GL_RG8:
771 case GL_RG8_SNORM:
772 case GL_RG16F:
773 case GL_RG32F:
774 case GL_RG8UI:
775 case GL_RG8I:
776 case GL_RG16UI:
777 case GL_RG16I:
778 case GL_RG32UI:
779 case GL_RG32I:
739 return kRed | kGreen; 780 return kRed | kGreen;
740 default: 781 default:
741 return 0x0000; 782 return 0x0000;
742 } 783 }
743 } 784 }
744 785
745 uint32 GLES2Util::GetChannelsNeededForAttachmentType( 786 uint32 GLES2Util::GetChannelsNeededForAttachmentType(
746 int type, uint32 max_color_attachments) { 787 int type, uint32 max_color_attachments) {
747 switch (type) { 788 switch (type) {
748 case GL_DEPTH_ATTACHMENT: 789 case GL_DEPTH_ATTACHMENT:
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 } 1089 }
1049 1090
1050 return true; 1091 return true;
1051 } 1092 }
1052 1093
1053 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1094 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1054 1095
1055 } // namespace gles2 1096 } // namespace gles2
1056 } // namespace gpu 1097 } // namespace gpu
1057 1098
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/BUILD.gn ('k') | gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698