tgsi/ureg: Add a function to return the number of outputs

We already hold the variable, just weren't providing access
to it.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
Zack Rusin
2013-04-23 23:36:40 -04:00
parent 53d36d5fb0
commit 3093ac6f4f
2 changed files with 15 additions and 0 deletions
+9
View File
@@ -1767,6 +1767,15 @@ no_ureg:
}
const unsigned
ureg_get_nr_outputs( const struct ureg_program *ureg )
{
if (!ureg)
return 0;
return ureg->nr_outputs;
}
void ureg_destroy( struct ureg_program *ureg )
{
unsigned i;
+6
View File
@@ -111,6 +111,12 @@ const struct tgsi_token *
ureg_get_tokens( struct ureg_program *ureg,
unsigned *nr_tokens );
/*
* Returns the number of currently declared outputs.
*/
const unsigned
ureg_get_nr_outputs( const struct ureg_program *ureg );
/* Free the tokens created by ureg_get_tokens() */
void ureg_free_tokens( const struct tgsi_token *tokens );