summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIago Toral Quiroga <itoral@igalia.com>2014-06-03 12:25:08 +0200
committerIago Toral Quiroga <itoral@igalia.com>2014-06-30 08:08:50 +0200
commit9650293b51b23b86f4fcf6875e1801555fa235d0 (patch)
tree77406c1c075634e99b5613bcea8e3d956a5ebb25
parent6d3632c9c9c58f8fe1bae26871432342ccaaaf4b (diff)
downloadexternal_mesa3d-9650293b51b23b86f4fcf6875e1801555fa235d0.zip
external_mesa3d-9650293b51b23b86f4fcf6875e1801555fa235d0.tar.gz
external_mesa3d-9650293b51b23b86f4fcf6875e1801555fa235d0.tar.bz2
i965/gs: Set number of control data bits for stream mode.
If the geometry shader is indeed using streams then we need 2 control data bits per vertex for the StreamID. If the shader is not using streams then we don't need control data bits. Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_gs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs.c b/src/mesa/drivers/dri/i965/brw_vec4_gs.c
index 4b1ba36..6428291 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs.c
@@ -81,10 +81,11 @@ do_gs_prog(struct brw_context *brw,
*/
c.prog_data.control_data_format = GEN7_GS_CONTROL_DATA_FORMAT_GSCTL_SID;
- /* However, StreamID is not yet supported, so we output zero bits of
- * control data per vertex.
- */
- c.control_data_bits_per_vertex = 0;
+ /* We only have to emit control bits if we are using streams */
+ if (prog->Geom.UsesStreams)
+ c.control_data_bits_per_vertex = 2;
+ else
+ c.control_data_bits_per_vertex = 0;
} else {
/* When the output type is triangle_strip or line_strip, EndPrimitive()
* may be used to terminate the current strip and start a new one