Commit Graph

19 Commits

Author SHA1 Message Date
Brian
339e7ec680 gallium: rework CSO-related code in state tracker
Use the code in cso_context.c rather than st_cache.c.
Basically, binding of state objects now goes through the CSO module.
But Vertex/fragment shaders go through pipe->bind_fs/vs_state() since they're
not cached by the CSO module at this time.

Also, update softpipe driver to handle NULL state objects in various places.
This happens during context destruction.  May need to update other drivers...
2008-03-11 18:55:58 -06:00
Brian
ecd50ef58b gallium: remove input_map[] from pipe_shader_state 2008-02-26 08:43:07 -07:00
José Fonseca
6acd63a498 Code reorganization: update build.
Update the Makefiles and includes for the new paths.

Note that there hasn't been no separation of the Makefiles yet, and make is
jumping all over the place. That will be taken care shortly. But for now, make
should work. It was tested with linux and linux-dri. Linux-cell and linux-llvm
might require some minor tweaks.
2008-02-15 17:50:12 +09:00
Brian
9677336845 gallium: rename st_fragment_program's fs field to cso to match st_vertex_program 2008-02-12 16:10:11 -07:00
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