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

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

Issue 12545014: Implement EXT_draw_buffers WebGL extention support in command buffer. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/context_group.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/gles2_cmd_utils.cc
===================================================================
--- gpu/command_buffer/common/gles2_cmd_utils.cc (revision 187725)
+++ gpu/command_buffer/common/gles2_cmd_utils.cc (working copy)
@@ -622,15 +622,19 @@
}
}
-uint32 GLES2Util::GetChannelsNeededForAttachmentType(int type) {
+uint32 GLES2Util::GetChannelsNeededForAttachmentType(
+ int type, uint32 max_color_attachments) {
switch (type) {
- case GL_COLOR_ATTACHMENT0:
- return kRGBA;
case GL_DEPTH_ATTACHMENT:
return kDepth;
case GL_STENCIL_ATTACHMENT:
return kStencil;
default:
+ if (type >= GL_COLOR_ATTACHMENT0 &&
+ type < static_cast<int>(
+ GL_COLOR_ATTACHMENT0 + max_color_attachments)) {
+ return kRGBA;
+ }
return 0x0000;
}
}
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/context_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698