diff options
author | rlp@google.com <rlp@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-02 23:28:00 +0000 |
---|---|---|
committer | rlp@google.com <rlp@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-02 23:28:00 +0000 |
commit | ac300913ded24c0e6887c72fa48435dc671bd16c (patch) | |
tree | 89a09fe8171122c66f74b1d6fbf2ec6df35ff37d /o3d/command_buffer/common | |
parent | dcdae9eeabbf866f98d7fab10096bb19054458cc (diff) | |
download | chromium_src-ac300913ded24c0e6887c72fa48435dc671bd16c.zip chromium_src-ac300913ded24c0e6887c72fa48435dc671bd16c.tar.gz chromium_src-ac300913ded24c0e6887c72fa48435dc671bd16c.tar.bz2 |
Adding GetStreamInfo functionality (and passing corresponding unit test).
Review URL: http://codereview.chromium.org/147237
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/command_buffer/common')
-rw-r--r-- | o3d/command_buffer/common/cross/cmd_buffer_format.h | 2 | ||||
-rw-r--r-- | o3d/command_buffer/common/cross/gapi_interface.h | 28 | ||||
-rw-r--r-- | o3d/command_buffer/common/cross/resource.h | 7 |
3 files changed, 37 insertions, 0 deletions
diff --git a/o3d/command_buffer/common/cross/cmd_buffer_format.h b/o3d/command_buffer/common/cross/cmd_buffer_format.h index b0b9386..1872a34 100644 --- a/o3d/command_buffer/common/cross/cmd_buffer_format.h +++ b/o3d/command_buffer/common/cross/cmd_buffer_format.h @@ -293,6 +293,8 @@ enum CommandId { SET_PARAM_DATA, // SetParamData, 4 args SET_PARAM_DATA_IMMEDIATE, // SetParamData, 2 args + data GET_PARAM_DESC, // GetParamDesc, 4 args + GET_STREAM_COUNT, // GetStreamCount, 4 args. + GET_STREAM_DESC, // GetStreamDesc, 5 args DESTROY_TEXTURE, // DestroyTexture, 1 arg CREATE_TEXTURE_2D, // CreateTexture2D, 3 args CREATE_TEXTURE_3D, // CreateTexture3D, 4 args diff --git a/o3d/command_buffer/common/cross/gapi_interface.h b/o3d/command_buffer/common/cross/gapi_interface.h index 9531973..67700b7 100644 --- a/o3d/command_buffer/common/cross/gapi_interface.h +++ b/o3d/command_buffer/common/cross/gapi_interface.h @@ -481,6 +481,34 @@ class GAPIInterface { unsigned int size, void *data) = 0; + // Gets the number of input streams for an effect, returning it in a memory + // buffer as a Uint32. + // Parameters: + // id: the resource ID of the effect. + // size: the size of the data buffer. Must be at least 4 (the size of the + // Uint32). + // data: the buffer receiving the data. + // Returns: + // BufferSyncInterface::PARSE_INVALID_ARGUMENTS if invalid arguments are + // passed, BufferSyncInterface::PARSE_NO_ERROR otherwise. + virtual ParseError GetStreamCount(ResourceID id, + unsigned int size, + void *data) = 0; + + // Gets the stream semantics, storing them in the data buffer. The stream + // is described by an effect_stream::Desc structure which contains a + // semantic type and a semantic index. + // Parameters: + // id: the resource ID of the effect. + // index: which stream semantic to get + // size: the size of the data buffer. Must be at least 8 (the size of two + // Uint32). + // data: the buffer receiving the data. + virtual ParseError GetStreamDesc(ResourceID id, + unsigned int index, + unsigned int size, + void *data) = 0; + // Creates a 2D texture resource. // Parameters: // id: the resource ID of the texture. diff --git a/o3d/command_buffer/common/cross/resource.h b/o3d/command_buffer/common/cross/resource.h index 8e86723..861d24f 100644 --- a/o3d/command_buffer/common/cross/resource.h +++ b/o3d/command_buffer/common/cross/resource.h @@ -134,6 +134,13 @@ struct Desc { }; } // namespace effect_param +namespace effect_stream { +struct Desc { + Uint32 semantic; // the semantic type + Uint32 semantic_index; +}; +} // namespace effect_stream + namespace texture { // Texture flags. enum Flags { |