aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: inline st_prepare_fragment_program in st_translate_fragment_programBryan Cain2011-08-081-164/+162
| | | | | | | | | This reverts an unnecessary part of commit 4683529048ee and fixes misrendering and an assertion failure in Cogs. Fixes freedesktop.org bug 39888. Reviewed-by: Brian Paul <[email protected]>
* Merge branch 'glsl-to-tgsi'Bryan Cain2011-08-041-184/+228
|\ | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_atom_pixeltransfer.c src/mesa/state_tracker/st_program.c
| * glsl_to_tgsi: stop generating Mesa IRBryan Cain2011-08-011-4/+9
| | | | | | | | | | Before, it was still generating unused Mesa IR as a remnant of ir_to_mesa, and depended on some of the information from it.
| * st/mesa: Add a GLSL IR to TGSI translator.Bryan Cain2011-08-011-180/+219
| | | | | | | | | | | | | | | | | | | | It is still a work in progress at this point, but it produces working and reasonably well-optimized code. Originally based on ir_to_mesa and st_mesa_to_tgsi, but does not directly use Mesa IR instructions in TGSI generation, instead generating TGSI from the intermediate class glsl_to_tgsi_instruction. It also has new optimization passes to replace _mesa_optimize_program.
* | st/mesa: remove unused-but-set variables in st_program.cMarek Olšák2011-07-151-33/+31
|/
* st/mesa: more helpful debug message in destroy_program_variants_cb()Brian Paul2011-06-081-2/+2
|
* st/mesa: use BITFIELD64_BIT() macro in a few more placesBrian Paul2011-03-151-1/+1
|
* st/mesa: fix shader deletion regressionBrian Paul2011-02-081-3/+4
| | | | | | | | | 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
* mesa/st: Plug a fragment program variant parameter leakThomas Hellstrom2011-02-081-0/+2
| | | | | | | Fixes a minor memory leak with the "engine" mesa demo. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* st/mesa: free the temporary bitmap/drawpix shader codeBrian Paul2011-02-081-2/+10
| | | | | | | 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.
* st/mesa: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-091-0/+1
|
* st/mesa: skip glDrawPixels/glBitmap-related code for ES buildBrian Paul2011-01-041-0/+2
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32560
* mesa/st: set the color write cbuf property for fragColor writesDave Airlie2010-12-241-0/+5
|
* st/mesa: s/varient/variantBrian Paul2010-12-161-87/+87
|
* st/mesa: fix incorrect prev pointer in destroy_program_variants()Brian Paul2010-12-141-9/+9
|
* st/mesa: rename the varient release functionsBrian Paul2010-12-141-3/+3
|
* st/mesa: add geom program code in destroy_program_variants()Brian Paul2010-12-131-0/+21
|
* st/mesa: use st_fragment_program() instead of castBrian Paul2010-12-131-2/+2
|
* st/mesa: minor re-indentingBrian Paul2010-12-131-17/+16
|
* Squashed commit of the following (st-mesa-per-context-shaders branch):Brian Paul2010-12-131-193/+558
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4f106f44a32eaddb6cf3fea6ba5ee9787bff609a Author: Brian Paul <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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.
* st/mesa: initialize key in st_vp_varientMarek Olšák2010-12-051-0/+2
| | | | | | | | | 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 <[email protected]>
* st/mesa: Silence uninitialized variable warning.Vinson Lee2010-10-281-0/+4
| | | | | | 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
* Track separate programs for each stageIan Romanick2010-10-271-6/+32
| | | | | The assumption is that all stages are the same program or that varyings are passed between stages using built-in varyings.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-1/+1
|
* st/mesa: use shader stencil export to accelerate shader drawpixels.Dave Airlie2010-10-131-0/+9
| | | | | | 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.
* gallium: rework handling of sprite_coord_enable stateBrian Paul2010-09-171-12/+5
| | | | | | | | | | | | | | | | | | | | 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.
* st/mesa: remove output register reads inside shadersMarek Olšák2010-08-161-0/+8
| | | | This is a GLSL2 regression fix.
* st/mesa: Clean up header file inclusion in st_mesa_to_tgsi.h.Vinson Lee2010-08-051-0/+1
| | | | | | | | | 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.
* mesa: get the translation from mesa 2d regs to tgsi workingZack Rusin2010-07-101-0/+3
| | | | first working version of arb_geometry_shader4
* gs: inject const int gl_VerticesIn at link timeZack Rusin2010-07-081-9/+2
|
* mesa: make the arguments in the asm statemants optionalZack Rusin2010-06-291-1/+0
| | | | geometry shaders emit/end functions don't take any arguments
* mesa: initial support for ARB_geometry_shader4Zack Rusin2010-06-281-0/+246
| | | | | | laying down the foundation for everything and implementing most of the stuff. linking, gl_VerticesIn and multidimensional inputs are left.
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-2/+2
|
* st/mesa: Do not use draw module in OpenGL ES build.Chia-I Wu2010-05-121-0/+2
| | | | | | | | 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.
* st/mesa: move/improve Mesa GPU program debuggingBrian Paul2010-04-281-10/+11
| | | | | Print the program (plus its parameters) before calling st_translate_mesa_program() in case we die in that function.
* st/mesa: use BITFIELD64_BIT to access shader OutputsWritten in more placesBen Skeggs2010-03-311-3/+3
|
* st/mesa: Fix memory leak on out-of-memory error path.Vinson Lee2010-02-211-1/+3
|
* st/mesa: move per-fragment shader fields to local varsBrian Paul2010-02-141-17/+19
|
* st/mesa: rename state -> tgsi, updated commentsBrian Paul2010-02-121-9/+9
|
* st/mesa: remove special-case cyl-wrap codeBrian Paul2010-02-091-9/+1
| | | | Cylinder wrap mode works with perspective interpolation now.
* st/mesa: check for PROG_PARAM_BIT_CYL_WRAP flagBrian Paul2010-02-091-1/+9
|
* st/mesa: 'fix' point coord semantic infoBrian Paul2010-02-051-1/+10
| | | | | | | | | | 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).
* st/mesa: remove duplicate calculation of fp input mappingKeith Whitwell2010-02-011-12/+7
| | | | | This was being calculated the same way in two different places. Now just do it in st_translate_fragment_program().
* st/mesa: remove dead stfp input_map arrayKeith Whitwell2010-02-011-9/+0
| | | | Was being calculated and not used. Also was probably incorrect...
* Merge branch 'mesa_7_7_branch'Jakob Bornecrantz2010-01-141-1/+0
|\ | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/util/Makefile src/gallium/drivers/r300/r300_state_derived.c
| * st/mesa: Remove unnecessary header from st_program.c.Vinson Lee2010-01-131-1/+0
| |
* | Merge branch 'gallium-edgeflags'Roland Scheidegger2009-12-221-6/+56
|\ \ | | | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_draw.c
| * | fix debug output mising from edgeflag changesRoland Scheidegger2009-12-181-0/+7
| | |
| * | gallium: fix mesa to tgsi translation for edgeflagsRoland Scheidegger2009-12-181-13/+15
| | | | | | | | | | | | test apps (progs/trivial/tri-edgeflags and similar) seem to work now
| * | gallium: edgeflags change fixesRoland Scheidegger2009-12-161-1/+7
| | | | | | | | | | | | | | | | | | use correct number of vertex inputs fix not running pipeline in case of edgeflags changes to mesa to tgsi translation still very broken