diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 01:11:37 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 01:11:37 +0000 |
commit | f7b85373bada6dc2da2ca3b47c38fc25d89dcf2e (patch) | |
tree | b14cdb3fd116c4287f2d61cd0f4e75c91cdf13b4 /gpu/command_buffer/common/gles2_cmd_format.h | |
parent | 50d22375941bee74a33e504c78e4355c878c30b9 (diff) | |
download | chromium_src-f7b85373bada6dc2da2ca3b47c38fc25d89dcf2e.zip chromium_src-f7b85373bada6dc2da2ca3b47c38fc25d89dcf2e.tar.gz chromium_src-f7b85373bada6dc2da2ca3b47c38fc25d89dcf2e.tar.bz2 |
Implements glGetUniformiv and glGetUniformfv.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/566019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/common/gles2_cmd_format.h')
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_format.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_format.h b/gpu/command_buffer/common/gles2_cmd_format.h index 7598318..d6d3beb 100644 --- a/gpu/command_buffer/common/gles2_cmd_format.h +++ b/gpu/command_buffer/common/gles2_cmd_format.h @@ -40,10 +40,22 @@ struct SizedResult { T GetDataAs() { return static_cast<T>(static_cast<void*>(&data)); } + + // Returns the size of the SizedResult for a given size of result. + static size_t GetSize(size_t size_of_result) { + return size_of_result + sizeof(uint32); // NOLINT + } + uint32 size; // in bytes. int32 data; // this is just here to get an offset. }; +COMPILE_ASSERT(sizeof(SizedResult) == 8, SizedResult_size_not_8); +COMPILE_ASSERT(offsetof(SizedResult, size) == 0, + OffsetOf_SizedResult_size_not_0); +COMPILE_ASSERT(offsetof(SizedResult, data) == 4, + OffsetOf_SizedResult_data_not_4); + #include "gpu/command_buffer/common/gles2_cmd_format_autogen.h" // These are hand written commands. |