aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * | gallium: more work for edgeflags changesRoland Scheidegger2009-12-141-5/+10
| | | | | | | | | | | | | | | fixes, cleanups, etc. not working yet
| * | gallium: first steps to treat edgeflags as regular vertex elementKeith Whitwell2009-12-091-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | Merge branch 'mesa_7_7_branch'Brian Paul2009-12-211-0/+2
|\ \ \ | |/ / |/| / | |/ | | | | Conflicts: src/mesa/main/version.h src/mesa/state_tracker/st_atom_shader.c
| * st/mesa: move assert on nr vs insns until after pos_invarient expansionKeith Whitwell2009-12-181-0/+2
| | | | | | | | | | | | 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.
* | st/mesa: fix up commentBrian Paul2009-12-071-2/+5
| |
* | Merge commit 'origin/st-shader-varients'Roland Scheidegger2009-11-261-253/+117
|\ \ | |/ |/| | | | | | | Conflicts: src/mesa/state_tracker/st_atom_shader.c src/mesa/state_tracker/st_program.c
| * mesa/st: refactor vertex and fragment shader translationKeith Whitwell2009-11-151-153/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * mesa/st: don't calculate unused output_flags data eitherKeith Whitwell2009-11-151-20/+2
| |
| * mesa/st: don't calculate unused input_flags dataKeith Whitwell2009-11-151-14/+2
| |
| * mesa/st: don't calculate unused vs input semantic tagsKeith Whitwell2009-11-151-69/+2
| |
* | Merge branch 'outputswritten64'Ian Romanick2009-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a GLbitfield64 type and several macros to operate on 64-bit fields. The OutputsWritten field of gl_program is changed to use that type. This results in a fair amount of fallout in drivers that use programs. No changes are strictly necessary at this point as all bits used are below the 32-bit boundary. Fairly soon several bits will be added for clip distances written by a vertex shader. This will cause several bits used for varyings to be pushed above the 32-bit boundary. This will affect any drivers that support GLSL. At this point, only the i965 driver has been modified to support this eventuality. I did this as a "squash" merge. There were several places through the outputswritten64 branch where things were broken. I foresee this causing difficulties later for bisecting. The history is still available in the branch. Conflicts: src/mesa/drivers/dri/i965/brw_wm.h
* | mesa: fix assorted compiler warningsBrian Paul2009-11-171-2/+2
|/
* mesa/st: add ST_DEBUG environment variableKeith Whitwell2009-10-051-7/+13
| | | | | At last it's possible to turn on tgsi dumps and other debugging in the state tracker without modifying sources...
* mesa: Ensure TGSI tokens are freed with gallium's free.José Fonseca2009-09-211-1/+1
| | | | To avoid breaking the gallium's builtin malloc debugging.
* st/mesa: convert to new tgsi_ureg mechanism for shader emitKeith Whitwell2009-09-141-87/+41
| | | | | | | | | Should be easier to read and work with than the older ways of emitting TGSI tokens. Also, emit simpler TGSI than previously: - translate away source and dest extended modifiers - translate away the SWZ opcode
* mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputsBrian Paul2009-07-291-28/+14
| | | | | | | | | | Previously, the FOGC attribute contained the fragment fog coord, front/back- face flag and the gl_PointCoord.xy values. Now each of those things are separate fragment program attributes. This simplifies quite a few things in Mesa and gallium. Need to test i965 driver and fix up point coord handling in the gallium/draw module...
* st/mesa: add some array index bounds assertionsBrian Paul2009-07-161-0/+5
|
* Merge branch 'mesa_7_5_branch'Jakob Bornecrantz2009-07-041-10/+24
|\
| * gallium: more fog extraction fixesZack Rusin2009-07-061-10/+24
| | | | | | | | | | fix the cases when fog coord/front face/point coord are used in the same shader.
* | Merge branch 'mesa_7_5_branch'Jakob Bornecrantz2009-07-031-1/+6
|\| | | | | | | | | | | Conflicts: src/mesa/main/dlist.c src/mesa/vbo/vbo_save_api.c
| * gallium: fix the front face semanticsZack Rusin2009-07-011-1/+6
| | | | | | | | | | | | | | | | mesa allocates both frontface and pointcoord registers within the fog coordinate register, by using swizzling. to make it cleaner and easier for drivers we want each of them in its own register. so when doing compilation from the mesa IR to tgsi allocate new registers for both and add new semantics to the respective declarations.
* | st/mesa: additional debug code (disabled)Brian Paul2009-06-121-0/+20
|/
* st/mesa: remove invalid assertionBrian Paul2009-06-081-3/+0
| | | | | | It's legal for ARB_vertex_program programs to not write to result.position. The results are undefined in that case. This assertion was causing us to abort/exit though.