OSDN Git Service

Don't always declare frag shader INPUT[0] as fragment position.
authorBrian <brian.paul@tungstengraphics.com>
Fri, 14 Dec 2007 18:00:46 +0000 (11:00 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 14 Dec 2007 18:00:46 +0000 (11:00 -0700)
commite785f190f0d49f0367f7468c22b77962d0f14ea0
tree41af7dbb2b05556deed248ff88b0934195e3ce78
parent23e36c2dfb1f9501a6a1023afc1d0c151f2e99c3
Don't always declare frag shader INPUT[0] as fragment position.

We were doing this for the sake of softpipe and the tgsi intergrepter since
we always need the fragment position and W-coordinate information in order
to compute fragment interpolants.
But that's not appropriate for hardware drivers.
The tgsi interpreter now get x,y,w information from a separate tgsi_exec_vector
variable setup by softpipe.
The new pipe_shader_state->input_map[] defines how vert shader outputs map
to frag shader inputs.  It may go away though, since one can also examine
the semantic label on frag shader input[0] to figure things out.
12 files changed:
src/mesa/pipe/p_state.h
src/mesa/pipe/softpipe/sp_context.h
src/mesa/pipe/softpipe/sp_headers.h
src/mesa/pipe/softpipe/sp_prim_setup.c
src/mesa/pipe/softpipe/sp_quad_earlyz.c
src/mesa/pipe/softpipe/sp_quad_fs.c
src/mesa/pipe/softpipe/sp_state_derived.c
src/mesa/pipe/tgsi/exec/tgsi_exec.c
src/mesa/pipe/tgsi/exec/tgsi_exec.h
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_mesa_to_tgsi.c
src/mesa/state_tracker/st_program.c