diff options
author | Brian <[email protected]> | 2008-02-27 18:46:54 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2008-02-27 18:46:54 -0700 |
commit | 1774b177b858f9f87d00e54b0bf00e9634e375e9 (patch) | |
tree | d657dba4bcadf9bedaac1bcbba3f4b56e7fc593a /src/gallium/auxiliary/draw/draw_context.c | |
parent | 627efcaa8009bb7ed6a7f266f8122df800bb2706 (diff) |
gallium: added draw_num_vs_outputs() to query number of post-transform vertex attribs
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 64ada8ce047..3500c34811c 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -282,6 +282,19 @@ draw_find_vs_output(struct draw_context *draw, /** + * Return number of vertex shader outputs. + */ +uint +draw_num_vs_outputs(struct draw_context *draw) +{ + uint count = draw->vertex_shader->info.num_outputs; + if (draw->extra_vp_outputs.slot >= 0) + count++; + return count; +} + + +/** * Allocate space for temporary post-transform vertices, such as for clipping. */ void draw_alloc_temp_verts( struct draw_stage *stage, unsigned nr ) |