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

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

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress 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 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/common/gles2_cmd_utils_autogen.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
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 0950b41df9e5fb70068486747f8e079c03e270dd..14d6a21da00383098998d99ea79953f0863ab648 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -870,6 +870,31 @@ uint64_t GLES2Util::MapTwoUint32ToUint64(uint32_t v32_0, uint32_t v32_1) {
return (v64 << 32) | v32_0;
}
+// static
+uint32_t GLES2Util::MapBufferTargetToBindingEnum(uint32_t target) {
+ switch (target) {
+ case GL_ARRAY_BUFFER:
+ return GL_ARRAY_BUFFER_BINDING;
+ case GL_COPY_READ_BUFFER:
+ return GL_COPY_READ_BUFFER_BINDING;
+ case GL_COPY_WRITE_BUFFER:
+ return GL_COPY_WRITE_BUFFER_BINDING;
+ case GL_ELEMENT_ARRAY_BUFFER:
+ return GL_ELEMENT_ARRAY_BUFFER_BINDING;
+ case GL_PIXEL_PACK_BUFFER:
+ return GL_PIXEL_PACK_BUFFER_BINDING;
+ case GL_PIXEL_UNPACK_BUFFER:
+ return GL_PIXEL_UNPACK_BUFFER_BINDING;
+ case GL_TRANSFORM_FEEDBACK_BUFFER:
+ return GL_TRANSFORM_FEEDBACK_BUFFER_BINDING;
+ case GL_UNIFORM_BUFFER:
+ return GL_UNIFORM_BUFFER_BINDING;
+ default:
+ return 0;
+ }
+}
+
+
namespace {
// WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/common/gles2_cmd_utils_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698