summaryrefslogtreecommitdiffstats
path: root/o3d/command_buffer/common
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/command_buffer/common')
-rw-r--r--o3d/command_buffer/common/cross/cmd_buffer_format.h2
-rw-r--r--o3d/command_buffer/common/cross/gapi_interface.h28
-rw-r--r--o3d/command_buffer/common/cross/resource.h7
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 {