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

Unified Diff: gpu/command_buffer/common/gles2_cmd_format.h

Issue 932963003: Add glClientWaitSync to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make flags non-static in the command Created 5 years, 10 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/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_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_format.h
diff --git a/gpu/command_buffer/common/gles2_cmd_format.h b/gpu/command_buffer/common/gles2_cmd_format.h
index 944edfd5d0c639a497b95107e9a8ff4f197da49a..7ddff933e45ce4c6079e0a58d40c7e0b2c299704 100644
--- a/gpu/command_buffer/common/gles2_cmd_format.h
+++ b/gpu/command_buffer/common/gles2_cmd_format.h
@@ -43,6 +43,7 @@ typedef void GLvoid;
typedef khronos_intptr_t GLintptr;
typedef khronos_ssize_t GLsizeiptr;
typedef struct __GLsync *GLsync;
+typedef uint64_t GLuint64;
namespace gpu {
namespace gles2 {
@@ -77,6 +78,31 @@ static_assert(kTextures == 4, "kTextures should equal 4");
} // namespace id_namespaces
+union GLuint64Union {
piman 2015/02/18 18:38:00 Oh, actually, I missed the fact that this was a un
Zhenyao Mo 2015/02/18 19:10:37 Thanks for catching this. My understanding of uni
+ GLuint64Union(GLuint64 v64)
+ : param64(v64) {
+ }
+
+ GLuint64Union(uint32_t v32_0, uint32_t v32_1) {
+ param32.v0 = v32_0;
+ param32.v1 = v32_1;
+ }
+
+ GLuint64 param64;
+ struct {
+ uint32_t v0;
+ uint32_t v1;
+ } param32;
+};
+
+static_assert(sizeof(GLuint64Union) == 8, "size of GLuint64Union should be 8");
+static_assert(offsetof(GLuint64Union, param64) == 0,
+ "offset of GLuint64Union.param64 should be 0");
+static_assert(offsetof(GLuint64Union, param32.v0) == 0,
+ "offset of GLuint64Union.param32.v0 should be 0");
+static_assert(offsetof(GLuint64Union, param32.v1) == 4,
+ "offset of GLuint64Union.param32.v1 should be 4");
+
// Used for some glGetXXX commands that return a result through a pointer. We
// need to know if the command succeeded or not and the size of the result. If
// the command failed its result size will 0.
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698