Commit Graph

15 Commits

Author SHA1 Message Date
Brian
86787043fa Fix problem in mapping vertex program outputs (found with "spring" game engine)
If the vertex program writes to an output that's not consumed by the
fragment program, map the vp output to an unused slot.
2008-01-31 14:05:04 -07:00
Brian
ac95fee4ff Fix problems with vertex shaders and the private draw module.
The CSO returned by pipe->create_vs_state() can't be passed to the
private draw module.  That was causing glRasterPos to blow up.
Add a 'draw_shader' field to st_vertex_program for use with the private
draw module.
Change st_context->state.vs type from cso_vertex_shader to st_vertex_program.
2008-01-14 19:13:34 -07:00
Brian
cedf6892e7 special-case PSIZE too 2007-12-19 13:16:36 -07:00
Brian
e785f190f0 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.
2007-12-14 11:00:46 -07:00
Michal Krol
abd5e8e41d gallium: reorg tgsi directories. 2007-11-23 13:28:16 +00:00
Brian
cc0b55c242 simplify code which access the current vertex/fragment shaders 2007-10-29 09:25:00 -06:00
Brian
ef6940f172 Move mesa_to_tgsi.[ch] to state_tracker 2007-10-27 09:03:15 -06:00
Zack Rusin
a7e997cfc5 Get rid of ST_NEW_SHADER flag and the dependency on _NEW_PROGRAM
which is being hit all the time. Done by Keith really.
2007-10-03 10:33:38 -04:00
Brian
ca34912bf7 assert that program length > 1 (some code, plus END) 2007-10-02 16:57:19 -06:00
Brian
b13618c316 fix a few vert/frag program items to get i915 driver going again 2007-10-01 13:45:53 -06:00
Brian
ae7f200788 fix bug causing unnecessary translations 2007-09-28 20:31:24 -06:00
Brian
636480cc9c Instead of linked program pairs, keep a list of vertex programs translated for each fragment program. 2007-09-28 15:39:39 -06:00
Brian
bad4e10af7 check for _NEW_PROGRAM mesa state (fixes arbfplight) 2007-09-26 15:34:51 -06:00
Brian
07f31a29b4 some clean-up of ST_NEW_ shader flags 2007-09-25 14:46:49 -06:00
Brian
07ef3e4245 vertex/fragment shader state and linking 2007-09-25 14:21:18 -06:00