<div dir="ltr">On 12 November 2013 17:51, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_vec4_gs.c | 6 ++++++<br>
1 file changed, 6 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs.c b/src/mesa/drivers/dri/i965/brw_vec4_gs.c<br>
index b52d646..e802c1e 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs.c<br>
@@ -194,6 +194,12 @@ do_gs_prog(struct brw_context *brw,<br>
c.prog_data.output_vertex_size_hwords * 32 * gp->program.VerticesOut;<br>
output_size_bytes += 32 * c.prog_data.control_data_header_size_hwords;<br>
<br>
+ /* Broadwell stores "Vertex Count" as a full 8 DWord (32 byte) URB output,<br>
+ * which comes before the conttrol header.<br>
+ */<br>
+ if (brw->gen >= 8)<br>
+ output_size_bytes += 32;<br>
+<br>
assert(output_size_bytes >= 1);<br>
if (output_size_bytes > GEN7_MAX_GS_URB_ENTRY_SIZE_BYTES)<br>
return false;<br>
<span class=""><font color="#888888">--<br>
1.8.3.2<br></font></span></blockquote><div><br></div><div>It looks like changes also need to be made to vec4_gs_visitor::emit_urb_write_opcode() and vec4_gs_visitor::emit_control_data_bits() to offset the vertex data and control data by 32 bytes, and to vec4_gs_visitor::emit_thread_end() to cause the appropriate data to be written to the vertex count. Are those changes elsewhere in the series?<br>
</div></div></div></div>