aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.h
Commit message (Collapse)AuthorAgeFilesLines
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* Replace gl_geom_attrib enum with gl_varying_slot.Paul Berry2013-03-151-4/+4
| | | | | | | | | | | | This patch makes the following search-and-replace changes: gl_geom_attrib -> gl_varying_slot GEOM_ATTRIB_* -> VARYING_SLOT_* GEOM_BIT_* -> VARYING_BIT_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* Replace gl_vert_result enum with gl_varying_slot.Paul Berry2013-03-151-4/+4
| | | | | | | | | | | This patch makes the following search-and-replace changes: gl_vert_result -> gl_varying_slot VERT_RESULT_* -> VARYING_SLOT_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: added st_print_current_vertex_program(), for debuggingBrian Paul2012-05-191-0/+4
|
* st/mesa: move fragment shader tgsi tokens into st_fp_variantMarek Olšák2012-01-251-2/+2
| | | | The TGSI code may vary depending on the clamp_color bit.
* st/mesa: do vertex and fragment color clamping in shadersMarek Olšák2012-01-251-0/+6
| | | | | | | | | | | | | | For ARB_color_buffer_float. Most hardware can't do it and st/mesa is the perfect place for a fallback. The exceptions are: - r500 (vertex clamp only) - nv50 (both) - nvc0 (both) - softpipe (both) We also have to take into account that r300 can do CLAMPED vertex colors only, while r600 can do UNCLAMPED vertex colors only. The difference can be expressed with the two new CAPs.
* st/mesa: inline st_prepare_fragment_program in st_translate_fragment_programBryan Cain2011-08-081-15/+0
| | | | | | | | | 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]>
* st/mesa: Add a GLSL IR to TGSI translator.Bryan Cain2011-08-011-0/+27
| | | | | | | | | | 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: s/varient/variantBrian Paul2010-12-161-31/+31
|
* st/mesa: rename the varient release functionsBrian Paul2010-12-141-3/+3
|
* st/mesa: program struct commentsBrian Paul2010-12-131-1/+3
|
* st/mesa: rename variableBrian Paul2010-12-131-2/+2
|
* Squashed commit of the following (st-mesa-per-context-shaders branch):Brian Paul2010-12-131-25/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-1/+1
|
* st/mesa: Clean up header file inclusion in st_program.h.Vinson Lee2010-08-051-5/+2
| | | | | | | | | | | | st_program.h Remove p_shader_tokens.h Include st_context.h for st_context symbol. Include p_state.h for PIPE_MAX_SHADER_INPUTS symbol. Remove unnecessary forward declarations. st_cb_bitmap.c st_cb_clear.c Include p_shader_tokens.h now that st_program.h doesn't include it.
* mesa: initial support for ARB_geometry_shader4Zack Rusin2010-06-281-3/+45
| | | | | | 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-1/+1
|
* st/mesa: move per-fragment shader fields to local varsBrian Paul2010-02-141-3/+0
|
* st/mesa: rename state -> tgsi, updated commentsBrian Paul2010-02-121-3/+5
|
* st/mesa: remove duplicate calculation of fp input mappingKeith Whitwell2010-02-011-5/+1
| | | | | 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-3/+0
| | | | Was being calculated and not used. Also was probably incorrect...
* gallium: edgeflags change fixesRoland Scheidegger2009-12-161-0/+3
| | | | | | use correct number of vertex inputs fix not running pipeline in case of edgeflags changes to mesa to tgsi translation still very broken
* gallium: first steps to treat edgeflags as regular vertex elementKeith Whitwell2009-12-091-1/+1
| | | | | | | | | | 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).
* mesa/st: refactor vertex and fragment shader translationKeith Whitwell2009-11-151-19/+56
| | | | | | | | | | | | | | | | | 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.
* gallium: added st_print_shaders() function to help w/ debuggingBrian Paul2008-11-061-0/+4
|
* gallium: fix vertex program output translation/mapping bugBrian Paul2008-08-181-1/+7
| | | | | | In some cases, the vertex program output's semantic info didn't match up with the fragment program's input semantic info. This info is now explicitly passed into the st_translate_fragment_program() function.
* gallium: move, increase ST_MAX_SHADER_TOKENSBrian Paul2008-07-031-3/+0
|
* gallium: implement full reference counting for vertex/fragment programsBrian Paul2008-05-071-1/+23
| | | | | | | | 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
* inline -> INLINEAlan Hourihane2008-05-021-2/+2
|
* gallium: fix some bitmap frag shader issuesBrian Paul2008-04-221-0/+4
| | | | | If texturing happens to be enabled when glBitmap() is called, need to be careful about choosing a sampler unit, etc.
* gallium: st_translate_fragment_program() is void nowBrian Paul2008-04-221-1/+1
| | | | The return value was never used.
* use cso fs/vs handle functionsKeith Whitwell2008-04-211-2/+2
|
* gallium: free bitmap fragment shaders, misc clean-upBrian Paul2008-03-241-4/+0
|
* gallium: remove semantic info from pipe_shader_stateBrian Paul2008-03-131-0/+2
| | | | Brian's patch to clean up the shader interfaces.
* gallium: rework CSO-related code in state trackerBrian2008-03-111-16/+6
| | | | | | | | | | 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...
* gallium: remove input_map[] from pipe_shader_stateBrian2008-02-261-0/+3
|
* Use gallium's rtasm module.José Fonseca2008-02-191-1/+0
|
* gallium: rename st_fragment_program's fs field to cso to match st_vertex_programBrian2008-02-121-1/+1
|
* Fix problems with vertex shaders and the private draw module.Brian2008-01-141-2/+5
| | | | | | | | 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.
* gallium: reorg tgsi directories.Michal Krol2007-11-231-1/+1
|
* Size of input_to_index array should be VERT_ATTRIB_MAX.Brian2007-10-101-1/+1
| | | | This fixes an out of bounds array write that was causing the glsl/bump demo to render incorrectly.
* Track fragment and vertex shader code generation via pipe shader state objects.Michel Dänzer2007-10-031-4/+0
| | | | | Unfortunately, the generated fragment shader code is effectively unusable until it handles quad->mask.
* Instead of linked program pairs, keep a list of vertex programs translated ↵Brian2007-09-281-8/+22
| | | | for each fragment program.
* Redoing the way we handle vertex shaders for the draw module.Zack Rusin2007-09-281-4/+0
|
* Revert "Redoing the way we handle vertex shaders for the draw module."Zack Rusin2007-09-281-0/+4
| | | | This reverts commit 6dcfddb8e2ec2bfb6187b912807fa65f28da2c5e.
* Redoing the way we handle vertex shaders for the draw module.Zack Rusin2007-09-281-4/+0
|
* Enable codegen based whenever __i386__ is defined.Keith Whitwell2007-09-271-2/+2
|
* Translate mesa vertex/fragment programs to TGSI programs at same time to do ↵Brian2007-09-251-10/+17
| | | | | | | | | | | | | | | | | | 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.
* Enable SSE2 for FS.michal2007-09-241-1/+5
|
* Checkpoint: vertex attribute clean-up.Brian2007-09-201-5/+0
| | | | | Remove/disable the attrib/slot mapping arrays in a few places. Work in progress...