gallium: rework handling of sprite_coord_enable state
authorBrian Paul <brianp@vmware.com>
Sat, 18 Sep 2010 00:41:30 +0000 (18:41 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 18 Sep 2010 00:45:13 +0000 (18:45 -0600)
commite22e3927b056806e9bbb089734132ad0bcb98df1
tree54e1a8fcdec93e315f9c04afefadedd43cc7877d
parent49cb978aa46af0d86ab609013d7883c8105a6d1d
gallium: rework handling of sprite_coord_enable state

Implement the pipe_rasterizer_state::sprite_coord_enable field
in the draw module (and softpipe) according to what's specified
in the documentation.

The draw module can now add any number of extra vertex attributes
to a post-transformed vertex and generate texcoords for those
attributes per sprite_coord_enable.  Auto-generated texcoords
for sprites only worked for one texcoord unit before.

The frag shader gl_PointCoord input is now implemented like any
other generic/texcoord attribute.

The draw module now needs to be informed about fragment shaders
since we need to look at the fragment shader's inputs to know
which ones need auto-generated texcoords.

Only softpipe has been updated so far.
12 files changed:
src/gallium/auxiliary/Makefile
src/gallium/auxiliary/SConscript
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_context.h
src/gallium/auxiliary/draw/draw_pipe_aaline.c
src/gallium/auxiliary/draw/draw_pipe_aapoint.c
src/gallium/auxiliary/draw/draw_pipe_wide_point.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/drivers/softpipe/sp_state.h
src/gallium/drivers/softpipe/sp_state_fs.c
src/mesa/state_tracker/st_atom_rasterizer.c
src/mesa/state_tracker/st_program.c