summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_program.c
AgeCommit message (Collapse)Author
2011-03-15st/mesa: use BITFIELD64_BIT() macro in a few more placesBrian Paul
2011-02-08st/mesa: fix shader deletion regressionBrian Paul
Fixes a regression from commit 5cbff0932e498f49b57cbb71037b93416bfe30e0. The problem is *some* glDrawPixels fragment programs need to be deleted, but not all. Use an explicit flag to indicate whether or not the program needs to be deleted. This should fix http://bugs.freedesktop.org/show_bug.cgi?id=34049
2011-02-08mesa/st: Plug a fragment program variant parameter leakThomas Hellstrom
Fixes a minor memory leak with the "engine" mesa demo. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2011-02-08st/mesa: free the temporary bitmap/drawpix shader codeBrian Paul
Fixes a per-shader memory leak when drawing glBitmaps, glDrawPixels or glCopyPixels. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-09st/mesa: Include mfeatures.h in files that perform feature tests.Vinson Lee
2011-01-04st/mesa: skip glDrawPixels/glBitmap-related code for ES buildBrian Paul
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32560
2010-12-24mesa/st: set the color write cbuf property for fragColor writesDave Airlie
2010-12-16st/mesa: s/varient/variantBrian Paul
2010-12-14st/mesa: fix incorrect prev pointer in destroy_program_variants()Brian Paul
2010-12-14st/mesa: rename the varient release functionsBrian Paul
2010-12-13st/mesa: add geom program code in destroy_program_variants()Brian Paul
2010-12-13st/mesa: use st_fragment_program() instead of castBrian Paul
2010-12-13st/mesa: minor re-indentingBrian Paul
2010-12-13Squashed commit of the following (st-mesa-per-context-shaders branch):Brian Paul
commit 4f106f44a32eaddb6cf3fea6ba5ee9787bff609a Author: Brian Paul <brianp@vmware.com> Date: Mon Dec 13 14:06:08 2010 -0700 st/mesa: reorganize vertex program translation code Now it looks like the fragment and geometry program code. Also remove the serial number fields from programs. It was used to determine when new translations were needed. Now the variant key is used for that. And the st_program_string_notify() callback removes all variants when the program's code is changed. commit e12d6791c5e4bff60bb2e6c04414b1b4d1325f3e Author: Brian Paul <brianp@vmware.com> Date: Mon Dec 13 13:38:12 2010 -0700 st/mesa: implement geometry shader varients Only needed in order to support per-context gallium shaders. commit c5751c673644808ab069259a852f24c4c0e92b9d Author: Brian Paul <brianp@vmware.com> Date: Sun Dec 12 15:28:57 2010 -0700 st/mesa: restore glDraw/CopyPixels using new fragment program variants Clean up the logic for fragment programs for glDraw/CopyPixels. We now generate fragment program variants for glDraw/CopyPixels as needed which do texture sampling, pixel scale/bias, pixelmap lookups, etc. commit 7b0bb99bab6547f503a0176b5c0aef1482b02c97 Author: Brian Paul <brianp@vmware.com> Date: Fri Dec 10 17:03:23 2010 -0700 st/mesa: checkpoint: implement fragment program variants The fragment programs variants are per-context, as the vertex programs. NOTE: glDrawPixels is totally broken at this point. commit 2cc926183f957f8abac18d71276dd5bbd1f27be2 Author: Brian Paul <brianp@vmware.com> Date: Fri Dec 10 14:59:32 2010 -0700 st/mesa: make vertex shader variants per-context Gallium shaders are per-context but OpenGL shaders aren't. So we need to make a different variant for each context. During context tear-down we need to walk over all shaders/programs and free all variants for the context being destroyed.
2010-12-05st/mesa: initialize key in st_vp_varientMarek Olšák
This fixes endless vertex shader recompilations in find_translated_vp if the shader contains an edge flag output. NOTE: This is a candidate for the 7.9 branch. Signed-off-by Brian Paul <brianp@vmware.com>
2010-10-28st/mesa: Silence uninitialized variable warning.Vinson Lee
Fixes this GCC warning. state_tracker/st_program.c: In function 'st_print_shaders': state_tracker/st_program.c:735: warning: 'sh' may be used uninitialized in this function
2010-10-27Track separate programs for each stageIan Romanick
The assumption is that all stages are the same program or that varyings are passed between stages using built-in varyings.
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-10-13st/mesa: use shader stencil export to accelerate shader drawpixels.Dave Airlie
If the pipe driver has shader stencil export we can accelerate DrawPixels using it. It tries to pick an S8 texture and works its way to X24S8 and S8X24 if that isn't supported.
2010-09-17gallium: rework handling of sprite_coord_enable stateBrian Paul
Implement the pipe_rasterizer_state::sprite_coord_enable field in the draw module (and softpipe) according to what's specified in the documentation. The draw module can now add any number of extra vertex attributes to a post-transformed vertex and generate texcoords for those attributes per sprite_coord_enable. Auto-generated texcoords for sprites only worked for one texcoord unit before. The frag shader gl_PointCoord input is now implemented like any other generic/texcoord attribute. The draw module now needs to be informed about fragment shaders since we need to look at the fragment shader's inputs to know which ones need auto-generated texcoords. Only softpipe has been updated so far.
2010-08-16st/mesa: remove output register reads inside shadersMarek Olšák
This is a GLSL2 regression fix.
2010-08-05st/mesa: Clean up header file inclusion in st_mesa_to_tgsi.h.Vinson Lee
st_mesa_to_tgsi.h Replace tgsi_ureg.h with a forward declaration. Include p_compiler.h for ubyte symbol. st_program.c Include tgsi_ureg.h directly.
2010-07-10mesa: get the translation from mesa 2d regs to tgsi workingZack Rusin
first working version of arb_geometry_shader4
2010-07-08gs: inject const int gl_VerticesIn at link timeZack Rusin
2010-06-29mesa: make the arguments in the asm statemants optionalZack Rusin
geometry shaders emit/end functions don't take any arguments
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-10mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul
2010-05-12st/mesa: Do not use draw module in OpenGL ES build.Chia-I Wu
This removes references to symbols in draw module for OpenGL ES build. As OpenGL ES does not support feedback/selection mode, draw module is used in pathes that will never be reached. However, if the symbols are referenced, it will bloat the final shared libraries unnecessarily. This is serious when LLVM is enabled.
2010-04-28st/mesa: move/improve Mesa GPU program debuggingBrian Paul
Print the program (plus its parameters) before calling st_translate_mesa_program() in case we die in that function.
2010-03-31st/mesa: use BITFIELD64_BIT to access shader OutputsWritten in more placesBen Skeggs
2010-02-21st/mesa: Fix memory leak on out-of-memory error path.Vinson Lee
2010-02-14st/mesa: move per-fragment shader fields to local varsBrian Paul
2010-02-12st/mesa: rename state -> tgsi, updated commentsBrian Paul
2010-02-09st/mesa: remove special-case cyl-wrap codeBrian Paul
Cylinder wrap mode works with perspective interpolation now.
2010-02-09st/mesa: check for PROG_PARAM_BIT_CYL_WRAP flagBrian Paul
2010-02-05st/mesa: 'fix' point coord semantic infoBrian Paul
This fixes the progs/glsl/pointcoord.c demo. But this isn't a proper fix. We really need a TGSI_SEMANTIC_POINT_COORD label so that the draw module can determine which fragment input / vertex output slot needs to be set up with the point coordinate info. We've been using generic slot 0 so far. This would also require telling the draw module about fragment shaders (something it doesn't have at this time).
2010-02-01st/mesa: remove duplicate calculation of fp input mappingKeith Whitwell
This was being calculated the same way in two different places. Now just do it in st_translate_fragment_program().
2010-02-01st/mesa: remove dead stfp input_map arrayKeith Whitwell
Was being calculated and not used. Also was probably incorrect...
2010-01-14Merge branch 'mesa_7_7_branch'Jakob Bornecrantz
Conflicts: src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/util/Makefile src/gallium/drivers/r300/r300_state_derived.c
2010-01-13st/mesa: Remove unnecessary header from st_program.c.Vinson Lee
2009-12-22Merge branch 'gallium-edgeflags'Roland Scheidegger
Conflicts: src/mesa/state_tracker/st_draw.c
2009-12-21Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/main/version.h src/mesa/state_tracker/st_atom_shader.c
2009-12-18fix debug output mising from edgeflag changesRoland Scheidegger
2009-12-18gallium: fix mesa to tgsi translation for edgeflagsRoland Scheidegger
test apps (progs/trivial/tri-edgeflags and similar) seem to work now
2009-12-16gallium: edgeflags change fixesRoland Scheidegger
use correct number of vertex inputs fix not running pipeline in case of edgeflags changes to mesa to tgsi translation still very broken
2009-12-14gallium: more work for edgeflags changesRoland Scheidegger
fixes, cleanups, etc. not working yet
2009-12-09gallium: first steps to treat edgeflags as regular vertex elementKeith Whitwell
The idea here is to eliminate the set_edgeflags() call in pipe_context by treating edgeflags as a regular vertex element. Edgeflags provoke special treatment in hardware, which means we need to label them in some way, in this case we'll be passing them through the vertex shader and labelling the vertex shader output with a new TGSI semantic (TGSI_SEMANTIC_EDGEFLAG).
2009-12-18st/mesa: move assert on nr vs insns until after pos_invarient expansionKeith Whitwell
It is possible to have a 1-instruction vertex shader before expanding pos_invarient. Not sure what this assert achieved, but at least move it where it is correct.
2009-12-07st/mesa: fix up commentBrian Paul
2009-11-26Merge commit 'origin/st-shader-varients'Roland Scheidegger
Conflicts: src/mesa/state_tracker/st_atom_shader.c src/mesa/state_tracker/st_program.c