diff options
author | dyen <dyen@chromium.org> | 2015-07-16 15:59:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-16 23:00:45 +0000 |
commit | da06bae00bee789d12cd6f4418018d048b04cfd2 (patch) | |
tree | 79826f0d5e5e3aa6188b8054bceacfce03f2a37c /gpu/command_buffer/common/gles2_cmd_format_autogen.h | |
parent | 65410813e3997a19f99d35f059e8d8f8b6986d35 (diff) | |
download | chromium_src-da06bae00bee789d12cd6f4418018d048b04cfd2.zip chromium_src-da06bae00bee789d12cd6f4418018d048b04cfd2.tar.gz chromium_src-da06bae00bee789d12cd6f4418018d048b04cfd2.tar.bz2 |
Added support for TimeStamp queries using QueryCounterEXT.
BUG=345227
TEST=trybots
Review URL: https://codereview.chromium.org/1233233002
Cr-Commit-Position: refs/heads/master@{#339153}
Diffstat (limited to 'gpu/command_buffer/common/gles2_cmd_format_autogen.h')
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_format_autogen.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h index 1c0a9c0..6a0c173 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h @@ -11055,6 +11055,65 @@ static_assert(offsetof(DeleteQueriesEXTImmediate, header) == 0, static_assert(offsetof(DeleteQueriesEXTImmediate, n) == 4, "offset of DeleteQueriesEXTImmediate n should be 4"); +struct QueryCounterEXT { + typedef QueryCounterEXT ValueType; + static const CommandId kCmdId = kQueryCounterEXT; + static const cmd::ArgFlags kArgFlags = cmd::kFixed; + static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); + + static uint32_t ComputeSize() { + return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT + } + + void SetHeader() { header.SetCmd<ValueType>(); } + + void Init(GLuint _id, + GLenum _target, + uint32_t _sync_data_shm_id, + uint32_t _sync_data_shm_offset, + GLuint _submit_count) { + SetHeader(); + id = _id; + target = _target; + sync_data_shm_id = _sync_data_shm_id; + sync_data_shm_offset = _sync_data_shm_offset; + submit_count = _submit_count; + } + + void* Set(void* cmd, + GLuint _id, + GLenum _target, + uint32_t _sync_data_shm_id, + uint32_t _sync_data_shm_offset, + GLuint _submit_count) { + static_cast<ValueType*>(cmd)->Init(_id, _target, _sync_data_shm_id, + _sync_data_shm_offset, _submit_count); + return NextCmdAddress<ValueType>(cmd); + } + + gpu::CommandHeader header; + uint32_t id; + uint32_t target; + uint32_t sync_data_shm_id; + uint32_t sync_data_shm_offset; + uint32_t submit_count; +}; + +static_assert(sizeof(QueryCounterEXT) == 24, + "size of QueryCounterEXT should be 24"); +static_assert(offsetof(QueryCounterEXT, header) == 0, + "offset of QueryCounterEXT header should be 0"); +static_assert(offsetof(QueryCounterEXT, id) == 4, + "offset of QueryCounterEXT id should be 4"); +static_assert(offsetof(QueryCounterEXT, target) == 8, + "offset of QueryCounterEXT target should be 8"); +static_assert(offsetof(QueryCounterEXT, sync_data_shm_id) == 12, + "offset of QueryCounterEXT sync_data_shm_id should be 12"); +static_assert(offsetof(QueryCounterEXT, sync_data_shm_offset) == 16, + "offset of QueryCounterEXT sync_data_shm_offset should be 16"); +static_assert(offsetof(QueryCounterEXT, submit_count) == 20, + "offset of QueryCounterEXT submit_count should be 20"); + struct BeginQueryEXT { typedef BeginQueryEXT ValueType; static const CommandId kCmdId = kBeginQueryEXT; |