summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_fragprog.c
Commit message (Collapse)AuthorAgeFilesLines
* Track separate programs for each stageIan Romanick2010-10-271-1/+1
| | | | | 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-5/+5
|
* swrast: Reduce header file inclusion in s_fragprog.h.Vinson Lee2010-08-071-0/+1
| | | | | | | | | s_fragprog.h Include mtype.h for GLcontext symbol. Include s_span.h for SWspan symbol. s_fragprog.c Include s_context.h now that it is removed from s_fragprog.h.
* swrast: Remove unnecessary headers.Vinson Lee2010-07-311-1/+0
|
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-1/+1
|
* mesa: replace _mesa_bzero() with memset()Brian Paul2010-02-191-2/+1
|
* swrast: silence double->float assignment warningsBrian Paul2010-01-271-3/+3
| | | | Reported by Karl Schultz.
* swrast: Implement ARB_fragment_coord_conventions but don't enable.Eric Anholt2010-01-261-0/+10
| | | | | | | | | | | This brings swrast's support up to the state of gallium, and fixes the default center behavior of fragment.position.xy in piglit fp-arb-fragment-coord-conventions-none. The extension is not enabled currently because the GLSL part of the extension isn't supported, so piglit glsl-arb-fragment-coord-conventions-define fails as would any serious test of the GLSL part.
* swrast: Remove unnecessary header from s_fragprog.c.Vinson Lee2010-01-121-1/+0
|
* Merge branch 'outputswritten64'Ian Romanick2009-11-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul2009-09-241-3/+8
|\
| * swrast: add lod bias when texture samplingBrian Paul2009-09-231-2/+7
| | | | | | | | | | | | Mostly fixes progs/demos/lodbias when MESA_TEX_PROG=1. But the LOD still seems off by -1 or so. May be an issue with the params passed to _swrast_compute_lambda()
| * swrast: fix typo in partial derivatives parameter passingBrian Paul2009-09-231-1/+1
| |
* | mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputsBrian Paul2009-07-291-3/+2
|/ | | | | | | | | | 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...
* mesa: texture combine clean-upsBrian Paul2009-04-011-2/+0
| | | | | | Use MAX_COMBINER_TERMS instead of 4. Rename some vars. Update comments.
* swrast: do texture sampling/combining in floating pointBrian Paul2009-04-011-11/+8
| | | | | The code's cleaner and a step toward supporting float-valued texture sampling. Some optimizations for common cases can be added and re-enabled...
* mesa: remove some last remnants of GL_MESA_program_debugBrian Paul2009-03-111-4/+0
|
* mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul2009-02-281-6/+6
| | | | | | | s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/ s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/ Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it. Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
* swrast: use ASSIGN_4V() macroBrian Paul2009-02-091-4/+2
|
* swrast: return (0,0,0,1) when sampling incomplete textures, not (0,0,0,0)Brian Paul2009-02-061-2/+4
| | | | Fixes piglit shaders/fp-incomplete-tex test.
* mesa: implement texture swizzling in swrastBrian Paul2009-01-281-8/+31
| | | | And enable GL_EXT_texture_swizzle for software drivers.
* mesa: if texObj is NULL in fetch_texel_*(), return black.Brian Paul2009-01-281-20/+32
|
* mesa: added comment about gl_PointCoordBrian Paul2008-08-111-0/+1
|
* added null texObj ptr check (bug 15567)Brian Paul2008-07-081-12/+16
|
* Updated GLSL uniform/sampler handling from gallium-0.1 branchBrian Paul2008-05-141-5/+9
| | | | | | | | | | Previously, the shader linker combined the uniforms used by the vertex and fragment shaders into a combined set of uniforms. This made the implementation of glUniform*() simple, but was rather inefficient otherwise. Now each shader gets its own set of uniforms (no more modelview matrix showing up in the fragment shader uniforms, for example). cherry-picked by hand from gallium-0.1 branch
* Simplify ctx->_NumColorDrawBuffers, _ColorDrawBuffers and fix bug 13835.Brian2008-01-061-5/+5
| | | | | | | | | | | These fields are no longer indexed by shader output. Now, we just have a simple array of renderbuffer pointers. If the shader writes to gl_FragData[i], send those colors to the N _ColorDrawBuffers. Otherwise, replicate the single gl_FragColor (or the fixed-function color) to the N _ColorDrawBuffers. A few more changes and simplifications can follow from this...
* fix span->facing computation and gl_FrontFacing initializationBrian2007-12-041-1/+1
|
* fix broken two-sided stencilBrian2007-11-301-1/+1
|
* Consolidate texture fetch code and use partial derivatives when possible.Brian2007-11-231-11/+12
|
* clamp lambda to Min/MaxLodBrian2007-11-201-3/+6
|
* Implement gl_PointCoord attribute for GLSL fragment shaders.Brian2007-10-241-0/+1
| | | | Contains the normalized fragment position within a point sprite.
* Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian2007-07-041-5/+5
| | | | of -I flags.
* Rework _mesa_update_texture_compare_function() to only be called duringBrian2007-06-111-20/+0
| | | | | | | state validation/update. Note that we're still temporarily skipping the test for an active fragment program. Need to fix shadow2D() ...
* Temporarily disable the calls to _mesa_update_texture_compare_function().Brian2007-06-111-0/+4
| | | | This fixes the depth-peel regression reported by Brad King.
* Add support for GL_ARB_fragment_program_shadow.Ian Romanick2007-06-071-1/+2
|
* Fix ARB_fp spec conformance bug WRT shadow sampling.Ian Romanick2007-06-071-0/+16
| | | | | The ARB_fp (and other assembly-level fragment program specs) say that the depth comparison function is always GL_NONE in fragment program mode.
* remove some unneeded code in init_machine()Brian2007-05-111-5/+0
|
* changes to get DDX/DDY working againBrian2007-05-021-0/+4
|
* only load front/back face attrib if using a shader (bug 10788)Brian2007-04-281-2/+4
|
* undo a test/debug changeBrian2007-04-211-1/+1
|
* Put gl_program_machine into swrast structure rather than using a local variable.Brian2007-04-191-8/+7
| | | | | Basically an easy way to make sure the memory gets initialized once (to zero) to avoid lots of valgrind warnings.
* Check if FRAG_RESULT_COLR is written and update span->interpMask, arrayMask.Brian2007-03-131-1/+8
| | | | Also, fix an assertion.
* Implement support for GL_ARB_draw_buffers with GL_MAX_DRAW_BUFFERS > 1.Brian2007-03-111-3/+21
| | | | | | GL_MAX_DRAW_BUFFERS is currently 4. Added gl_FragData[] output for fragment programs. In _swrast_write_rgba_span() loop over the color outputs/renderbuffers.
* Implement gl_FrontFacing for fragment shaders.Brian2007-03-101-0/+4
| | | | | | For the time being, we put the gl_FrontFacing value in the FOGC.Y input register. Combining FOGC and FrontFacing in one register is a bit of a hack and may need to be changed someday.
* remove unneeded includesBrian2007-02-251-4/+0
|
* remove 'maxInst' parameter from _mesa_execute_program()Brian2007-02-251-2/+1
|
* remove unused 'element' parameter from _mesa_execute_program()Brian2007-02-251-2/+1
|
* Use the new unified vertex/fragment program interpreter from prog_execute.c.Brian2007-02-221-1511/+12
| | | | Currently, DDX, DDY don't work.
* use MAX_PROGRAM_ENV_PARAMSBrian2007-02-221-3/+3
|
* Lots of changes to prog_print.c code.Brian2007-02-171-1/+2
| | | | Mainly, allow printing programs in either ARB, NV or "debug" formats.