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.h36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.h b/src/gallium/auxiliary/draw/draw_gs.h
index d8eb2103433..67bc1aa73ff 100644
--- a/src/gallium/auxiliary/draw/draw_gs.h
+++ b/src/gallium/auxiliary/draw/draw_gs.h
@@ -1,6 +1,6 @@
/**************************************************************************
*
- * Copyright 2009 VMWare Inc.
+ * Copyright 2009 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -54,23 +54,37 @@ struct draw_geometry_shader {
unsigned input_primitive;
unsigned output_primitive;
- /* Extracted from shader:
- */
- const float (*immediates)[4];
+ unsigned *primitive_lengths;
+ unsigned emitted_vertices;
+ unsigned emitted_primitives;
+
+ float (*tmp_output)[4];
+ unsigned vertex_size;
+
+ unsigned in_prim_idx;
+ unsigned input_vertex_stride;
+ const float (*input)[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 void *constants[PIPE_MAX_CONSTANT_BUFFERS],
+ const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS],
+ const struct draw_vertex_info *input_verts,
+ const struct draw_prim_info *input_prim,
+ struct draw_vertex_info *output_verts,
+ struct draw_prim_info *output_prims );
void draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
struct draw_context *draw);
void draw_geometry_shader_delete(struct draw_geometry_shader *shader);
+int draw_gs_max_output_vertices(struct draw_geometry_shader *shader,
+ unsigned pipe_prim);
#endif