draw: rework handling of non-existing outputs in emit code
authorRoland Scheidegger <sroland@vmware.com>
Thu, 7 Jan 2016 00:52:39 +0000 (01:52 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 7 Jan 2016 00:52:39 +0000 (01:52 +0100)
commitafa035031ff9e0c07a2297d864e46c76f7bfff58
tree9f009f93f55908dc82c6ef792c82935ebd322d33
parent39c41be50d9474dde4c0dcf23a546d14b212e80a
draw: rework handling of non-existing outputs in emit code

Previously the code would just redirect requests for attributes which
don't exist to use output 0. Rework this to output all zeros instead which
seems more useful - in particular some extensions like
ARB_fragment_layer_viewport require 0 in the fs even if it wasn't output by
previous stages. That way, drivers don't have to special case this depending
if the vs/gs outputs some attribute or not.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/gallium/auxiliary/draw/draw_pipe_vbuf.c
src/gallium/auxiliary/draw/draw_pt_emit.c
src/gallium/auxiliary/draw/draw_vertex.h