summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_gs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.h b/src/gallium/auxiliary/draw/draw_gs.h
index d8eb2103433..6a9800c43f4 100644
--- a/src/gallium/auxiliary/draw/draw_gs.h
+++ b/src/gallium/auxiliary/draw/draw_gs.h
@@ -54,18 +54,26 @@ struct draw_geometry_shader {
unsigned input_primitive;
unsigned output_primitive;
+ unsigned emitted_vertices;
+ unsigned emitted_primitives;
+
/* Extracted from shader:
*/
const float (*immediates)[4];
};
-void draw_geometry_shader_run(struct draw_geometry_shader *shader,
- const float (*input)[4],
- float (*output)[4],
- const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
- unsigned count,
- unsigned input_stride,
- unsigned output_stride);
+/*
+ * Returns the number of vertices emitted.
+ * The vertex shader can emit any number of vertices as long as it's
+ * smaller than the GS_MAX_OUTPUT_VERTICES shader property.
+ */
+int draw_geometry_shader_run(struct draw_geometry_shader *shader,
+ const float (*input)[4],
+ float (*output)[4],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
+ unsigned count,
+ unsigned input_stride,
+ unsigned output_stride);
void draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
struct draw_context *draw);