softpipe: tell draw about the vertex layout we want
authorRoland Scheidegger <sroland@vmware.com>
Tue, 22 Dec 2015 02:42:33 +0000 (03:42 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 7 Jan 2016 01:00:04 +0000 (02:00 +0100)
commit8d4039ecdb167771d4b085f70b9666438be1c6ad
treec1812ea0e1f41f09e8cc41a62ea4078ae30f1963
parent8e3a76791f208e67392b7b7a2e63eca32945ac7b
softpipe: tell draw about the vertex layout we want

This makes it more similar to llvmpipe. It also allows us to let draw emit
code handle things like getting zeros for non-existing vs outputs
automatically. There probably isn't really any overhead either way, there isn't
really any "simply copy everything" code in the emit path it would copy each
attrib individually just the same. Likewise, we still do another mapping step
in softpipe as the layout may still not match exactly (same as in llvmpipe,
should probably nuke the pointless mapping in both drivers).

This fixes the piglit arb_fragment_layer_viewport no_gs/no_write tests.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/gallium/drivers/softpipe/sp_context.h
src/gallium/drivers/softpipe/sp_prim_vbuf.c
src/gallium/drivers/softpipe/sp_setup.h
src/gallium/drivers/softpipe/sp_state_derived.c