summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_shader.c
AgeCommit message (Collapse)Author
2008-07-02gallium: fix a bug in vertex program output mappingBrian Paul
Need to translate VERT_RESULT_PSIZ, BFC0, BFC1 to TGSI shader output slots after all other attributes have been handled. This fixes a bug where generic vertex program outputs (varying vars) could get mapped to the same slot at point size or back-face colors.
2008-05-08gallium: don't free shader.tokens in get_passthrough_fs()Brian Paul
2008-05-07gallium: fix some render to texture bugsBrian Paul
Before, we were sometimes rendering into a stale texture because st_finalize_texture() would discard the old texture and create a new one. Moved st_update_framebuffer atom after texture validation so that we can create a new renderbuffer surface if the texture changes. Also, split texture validation into two parts: finalize_textures and update_textures. Do finalize_textures first to avoid getting into the situtation where we're doing a pipe->surface_copy() mid-way through state validation. Some debug code still in place, but disabled...
2008-05-07gallium: implement full reference counting for vertex/fragment programsBrian Paul
Use _mesa_reference_vert/fragprog() wherever we assign program pointers. Fixes a memory corruption bug found with glean/api2 test. Another memory bug involving shaders yet to be fixed... Picked from gallium-0.1
2008-05-02Some changed for non-C99 compilersAlan Hourihane
2008-04-21use cso fs/vs handle functionsKeith Whitwell
2008-04-21gallium: Use CSO cache for shaders.Michel Dänzer
2008-03-22gallium: fix a few more shader-related mem leaksBrian
2008-03-11gallium: rework CSO-related code in state trackerBrian
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-02-26gallium: remove input_map[] from pipe_shader_stateBrian
2008-02-15Code reorganization: update build.José Fonseca
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-12gallium: rename st_fragment_program's fs field to cso to match st_vertex_programBrian
2008-01-31Fix problem in mapping vertex program outputs (found with "spring" game engine)Brian
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-14Fix problems with vertex shaders and the private draw module.Brian
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.
2007-12-19special-case PSIZE tooBrian
2007-12-14Don't always declare frag shader INPUT[0] as fragment position.Brian
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-11-23gallium: reorg tgsi directories.Michal Krol
2007-10-29simplify code which access the current vertex/fragment shadersBrian
2007-10-27Move mesa_to_tgsi.[ch] to state_trackerBrian
2007-10-03Get rid of ST_NEW_SHADER flag and the dependency on _NEW_PROGRAMZack Rusin
which is being hit all the time. Done by Keith really.
2007-10-02assert that program length > 1 (some code, plus END)Brian
2007-10-01fix a few vert/frag program items to get i915 driver going againBrian
2007-09-28fix bug causing unnecessary translationsBrian
2007-09-28Instead of linked program pairs, keep a list of vertex programs translated ↵Brian
for each fragment program.
2007-09-26check for _NEW_PROGRAM mesa state (fixes arbfplight)Brian
2007-09-25some clean-up of ST_NEW_ shader flagsBrian
2007-09-25vertex/fragment shader state and linkingBrian