summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_gs.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2015-05-27 17:39:05 +1000
committerDave Airlie <airlied@redhat.com>2019-04-09 11:19:38 +1000
commit7720ce32aaca4f39ae8f1ca85cca552608ece3ae (patch)
treef876417d1a4d9e8024a3b944b9e34c1840446736 /src/gallium/auxiliary/draw/draw_gs.h
parentddb9ad363d900e00898b591fe0793622257acc47 (diff)
draw: add support to tgsi paths for geometry streams. (v2)
This hooks up the geometry shader processing to the TGSI support added in the previous commits. It doesn't change the llvm interface other than to keep things building. v2: fix some regressions caused by primitiveoffsets Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.h b/src/gallium/auxiliary/draw/draw_gs.h
index 149278dd080..9a9154969f5 100644
--- a/src/gallium/auxiliary/draw/draw_gs.h
+++ b/src/gallium/auxiliary/draw/draw_gs.h
@@ -57,6 +57,13 @@ struct draw_gs_inputs {
/**
* Private version of the compiled geometry shader
*/
+struct draw_vertex_stream {
+ unsigned *primitive_lengths;
+ unsigned emitted_vertices;
+ unsigned emitted_primitives;
+ float (*tmp_output)[4];
+};
+
struct draw_geometry_shader {
struct draw_context *draw;
@@ -74,14 +81,11 @@ struct draw_geometry_shader {
unsigned primitive_boundary;
unsigned input_primitive;
unsigned output_primitive;
-
- unsigned *primitive_lengths;
- unsigned emitted_vertices;
- unsigned emitted_primitives;
-
- float (*tmp_output)[4];
unsigned vertex_size;
+ struct draw_vertex_stream stream[TGSI_MAX_VERTEX_STREAMS];
+ unsigned num_vertex_streams;
+
unsigned in_prim_idx;
unsigned input_vertex_stride;
unsigned fetched_prim_count;
@@ -109,14 +113,15 @@ struct draw_geometry_shader {
unsigned num_vertices,
unsigned prim_idx);
void (*fetch_outputs)(struct draw_geometry_shader *shader,
+ unsigned vertex_stream,
unsigned num_primitives,
float (**p_output)[4]);
void (*prepare)(struct draw_geometry_shader *shader,
const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS]);
- unsigned (*run)(struct draw_geometry_shader *shader,
- unsigned input_primitives);
+ void (*run)(struct draw_geometry_shader *shader,
+ unsigned input_primitives, unsigned *out_prims);
};
void draw_geometry_shader_new_instance(struct draw_geometry_shader *gs);