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:
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user