aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2014-07-21 11:48:42 +0200
committerIago Toral Quiroga <[email protected]>2014-09-19 15:01:15 +0200
commitc091804f4cd282bfc03b02a7ef6c72e5f42f6c76 (patch)
treefe5ca2e126138779a131a64ed384baefa053214e /src/mesa/drivers/dri/i965/gen6_gs_visitor.h
parentc1b8a5155b4026ac6d0fdeae9afd12e489ef106b (diff)
i965/gen6/gs: Handle the case where a geometry shader emits no output.
In gen6 we need to end the thread differently depending on whether we have emitted at least one vertex or not. In case we did, the EOT message must always include the COMPLETE flag or else the GPU hangs. If we have not produced any output, however, we can't use the COMPLETE flag. This would lead us to end the program with an ENDIF opcode, which we want to avoid (and actually is not permitted since it hits an assertion), so instead what we do is that we always request a new VUE handle every time we do an URB WRITE, even for the last vertex we emit. With this we make sure that whether we have emitted at least one vertex or none at all we have to finish the thread without writing to the URB, which works for both cases by setting the COMPLETE and UNUSED flags in the EOT message. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_gs_visitor.h')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_gs_visitor.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_visitor.h b/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
index 68fe88ddd42..7af6405a282 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
+++ b/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
@@ -49,9 +49,8 @@ protected:
virtual void visit(ir_end_primitive *);
virtual void emit_urb_write_header(int mrf);
virtual void emit_urb_write_opcode(bool complete,
- src_reg vertex,
int base_mrf,
- int mlen,
+ int last_mrf,
int urb_offset);
private: