i965/vec4: Virtualize setup_payload instead of setup_attributes.
authorPaul Berry <stereotype441@gmail.com>
Sat, 13 Jul 2013 16:03:18 +0000 (09:03 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 23 Aug 2013 18:02:51 +0000 (11:02 -0700)
commit7f57101ad53112b16e4a400f312f68a85dfbd108
tree8417d2e1466468db11b7b52140ad23dc143f3f5a
parent626495d269e2c2df9dae5c46c086ffff93c77a19
i965/vec4: Virtualize setup_payload instead of setup_attributes.

When I initially generalized the vec4_visitor class in preparation for
geometry shaders, I assumed that the setup_attributes() function would
need to be different between vertex and geometry shaders, but its
caller, setup_payload(), could be shared.  So I made
setup_attributes() a virtual function.

It turns out this isn't true; setup_payload() needs to be different
too, since the geometry shader payload sometimes includes an extra
register (primitive ID) that has to come before uniforms.

So setup_payload() needs to be the virtual function instead of
setup_attributes().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp