OSDN Git Service

i965: Make emit_urb_writes() not produce an EOT message for GS.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 26 Jun 2016 07:39:19 +0000 (00:39 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 7 Jul 2016 15:12:31 +0000 (16:12 +0100)
commitdcc6dde5f90a27b0e86afeb15fc40c03759e7556
tree2860461d72b81ff37e33d360b70f6a95da3f3273
parent6d47c3eb4e54c58314c2e2a1ce3a478151485bea
i965: Make emit_urb_writes() not produce an EOT message for GS.

emit_urb_writes() contains code to emit an EOT write with no actual
data when there are no output varyings.  This makes sense for the VS
and TES stages, where it's called once at the end of the program.

However, in the geometry shader stage, emit_urb_writes() is called once
for every EmitVertex().  We explicitly emit a URB write with EOT set at
the end of the shader, separately from this path.  So we'd better not
terminate the thread.  This could get us into trouble for shaders which
do EmitVertex() with no varyings followed by SSBO/image/atomic writes.

It also caused us to emit multiple sends with EOT set, which apparently
confuses the register allocator into not using g112-g127 for all but
the first one.  This caused EU validation failures in OglGSCloth
shaders in shader-db.  (The actual application was fine, but shader-db
thinks there are no outputs because it doesn't understand transform
feedback.)

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 7e7e501acf3ea609e3e2e8bb4091a5a20ae3adc2)
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp