summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c13
-rw-r--r--src/gallium/auxiliary/draw/draw_context.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 64ada8ce04..3500c34811 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 )
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index d6685f479b..99bfef55f4 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -112,6 +112,10 @@ int
draw_find_vs_output(struct draw_context *draw,
uint semantic_name, uint semantic_index);
+uint
+draw_num_vs_outputs(struct draw_context *draw);
+
+
/*
* Vertex shader functions