i965: Make fs_visitor::emit_urb_writes set EOT for TES as well.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 2 Dec 2015 01:52:58 +0000 (17:52 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 11 Dec 2015 21:11:15 +0000 (13:11 -0800)
Tessellation evaluation shaders work almost identically to vertex
shaders - we have a set of URB writes at the end of the program, and the
last one should terminate it.

Geometry shaders really are the special case, where multiple
EmitVertex() calls trigger URB writes in the middle of the program.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index a9a20aad3524a577679e861b37c355a8e470c56d..0582e7831def567be495f06098528b869902082c 100644 (file)
@@ -870,7 +870,7 @@ fs_visitor::emit_urb_writes(const fs_reg &gs_vertex_count)
                            header_size);
 
          fs_inst *inst = abld.emit(opcode, reg_undef, payload);
-         inst->eot = last && stage == MESA_SHADER_VERTEX;
+         inst->eot = last && stage != MESA_SHADER_GEOMETRY;
          inst->mlen = length + header_size;
          inst->offset = urb_offset;
          urb_offset = starting_urb_offset + slot + 1;