summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_program.c
AgeCommit message (Collapse)Author
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-06-28mesa: initial support for ARB_geometry_shader4Zack Rusin
laying down the foundation for everything and implementing most of the stuff. linking, gl_VerticesIn and multidimensional inputs are left.
2010-06-26st/mesa: Remove unnecessary headers.Vinson Lee
2010-06-10mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul
2010-06-10mesa: refactor shader api / object codeBrian Paul
Remove the unneeded ctx->Driver hooks for shader-related functions. Move state and API-related things into main/.
2010-02-12st/mesa: rename state -> tgsi, updated commentsBrian Paul
2010-02-04mesa: change ctx->Driver.ProgramStringNotify() to return GLbooleanBrian Paul
GL_TRUE indicates that the driver accepts the program. GL_FALSE indicates the program can't be compiled/translated by the driver for some reason (too many resources used, etc). Propogate this result up to the GL API: set GL_INVALID_OPERATION error if glProgramString() was called. Set shader program link status to GL_FALSE if glLinkProgram() was called. At this point, drivers still don't do any program checking and always return GL_TRUE.
2010-01-31st/mesa: Remove unnecessary headers.Vinson Lee
2010-01-22Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
2010-01-15st/mesa: Remove unnecessary header from st_cb_program.c.Vinson Lee
2009-11-15mesa/st: refactor vertex and fragment shader translationKeith Whitwell
Translate vertex shaders independently of fragment shaders. Previously tried to make fragment shader semantic indexes always start at zero and exclude holes. This was unnecessary but meant that vertex shader translation had to be adjusted to take this into account. Now use a fixed scheme for labelling special FS input semantics (color, etc), and another fixed scheme for the generics. With this, vertex shaders can be translated independently of the bound fragment shader, assuming mesa has done its own job and ensured that the vertex shader provides at least the inputs the fragment shader is looking for. The state-tracker didn't attempt to do anything about this previously, so it shouldn't be needed now.
2009-09-21mesa: Ensure TGSI tokens are freed with gallium's free.José Fonseca
To avoid breaking the gallium's builtin malloc debugging.
2009-02-12mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul
2009-02-12mesa: consistantly use mesa memory-functions in gallium state trackerBrian Paul
Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc. Still using CALLOC_STRUCT() at this point.
2008-07-10gallium: check for FEATURE_feedback and FEATURE_drawpix when creating/using ↵Brian Paul
the aux draw module
2008-05-20Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul
2008-05-20gallium: fix vertex shader mem leak (glRasterPos)Brian Paul
2008-05-20Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul
2008-05-20gallium: fix default case in st_new_program()Brian Paul
2008-05-19fix program delete/refcount bugBrian Paul
cherry-picked from gallium-tex-surfaces
2008-05-18fix program delete/refcount bugBrian Paul
2008-04-24gallium: use cso_destroy_vertex/fragment_shader() functionsBrian Paul
Also, rearrange the st_destroy_context() code a bit to prevent some invalid/NULL ptr derefs during tear-down.
2008-04-22gallium: fix some bitmap frag shader issuesBrian Paul
If texturing happens to be enabled when glBitmap() is called, need to be careful about choosing a sampler unit, etc.
2008-03-24gallium: free bitmap fragment shaders, misc clean-upBrian Paul
2008-03-22gallium: fix a few more shader-related mem leaksBrian
2008-03-22gallium: fix a few mem leaks when deleting programsBrian
2008-03-14gallium: in st_program_string_notify() free shader tokens.Brian
When the shader instructions change, free the TGSI tokens. This signals the state tracker to recompile the shader. Fixes a regression caused by recent shader/state-tracker changes.
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-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-15include pipe/draw/draw_context.hBrian
2008-01-14free stvp->draw_shaderBrian
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-10-30Use program serial numbers to avoid re-generating fragment programs for ↵Brian
glDrawPixels.
2007-10-27Move mesa_to_tgsi.[ch] to state_trackerBrian
2007-10-10remove unused varBrian
2007-10-03Track fragment and vertex shader code generation via pipe shader state objects.Michel Dänzer
Unfortunately, the generated fragment shader code is effectively unusable until it handles quad->mask.
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-09-28fix st_use_program()Brian
2007-09-28Instead of linked program pairs, keep a list of vertex programs translated ↵Brian
for each fragment program.
2007-09-28Redoing the way we handle vertex shaders for the draw module.Zack Rusin
2007-09-28Revert "Redoing the way we handle vertex shaders for the draw module."Zack Rusin
This reverts commit 6dcfddb8e2ec2bfb6187b912807fa65f28da2c5e.
2007-09-28Redoing the way we handle vertex shaders for the draw module.Zack Rusin
2007-09-27Enable codegen based whenever __i386__ is defined.Keith Whitwell
2007-09-25some clean-up of ST_NEW_ shader flagsBrian
2007-09-25Translate mesa vertex/fragment programs to TGSI programs at same time to do ↵Brian
proper linking. Previously, programs were translated independently during validation. The problem is the translation to TGSI format, which packs shader input/outputs into continuous slots, depends on which vertex program is being paired with which fragment shader. Now, we look at the outputs of the vertex program in conjunction with the inputs of the fragment shader to be sure the attributes match up correctly. The new 'linked_program_pair' class keeps track of the associations between vertex and fragment shaders. It's also the place where the TGSI tokens are kept since they're no longer per-program state but per-linkage. Still a few loose ends, like implementing some kind of hash/lookup table for linked_program_pairs.
2007-09-24Enable SSE2 for FS.michal
2007-08-25checkpoint in constant tracking reworkKeith Whitwell
2007-08-24check for USE_X86_ASM or SLANG_X86 in st_delete_program()Brian
2007-08-24Hook-up SSE2 to VS.michal