summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: fix instruction indexing bugsBrian Paul2010-04-091-2/+2
| | | | | | | We were looping over instructions but only looking at the 0th instruction's opcode. Fixes fd.o bug 27566.
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-8/+8
|
* mesa: replace _mesa_bzero() with memset()Brian Paul2010-02-191-1/+1
|
* Remove _mesa_memset in favor of plain memset.Kenneth Graunke2010-02-191-1/+1
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke2010-02-191-1/+1
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* mesa: copy frag coord layout fields tooBrian Paul2010-02-131-0/+2
|
* mesa: change _mesa_find_free_register() to find multiple free regsBrian Paul2010-02-011-26/+46
| | | | | | | | | | | | | | | | | Before, _mesa_find_free_register() would scan the given shader to find a free/unused register of the given type. But subsequent calls would return the same register again. This caused a failure in the _mesa_remove_output_reads() function which sometimes needs several free temps. Now use a new function which build a vector of 'used' flags and another function which searches that vector for an unused register starting at a position that's incremented for each call. Fixes fd.o bug 26317. Note that a regression test for this has been added to the glean/glsl1 test. (cherry picked from commit e0d01c9d7f46ccd531f8dd1a04c5ac067200ef1e)
* mesa: fix double->float assignment warnings, int/uint comparison warningsBrian Paul2010-01-271-1/+1
| | | | Reported by Karl Schultz.
* Merge branch 'mesa_7_6_branch' into mesa_7_7_branchBrian Paul2009-12-111-3/+11
|\
| * mesa: check dst reg in _mesa_find_free_register()Brian Paul2009-12-111-3/+11
| | | | | | | | | | | | | | | | If a register was only being used as a destination (as will happen when generated condition-codes) we missed its use. So we'd errantly return a register index that was really in-use, not free. Fixes bug 25579.
* | mesa: remove: unused gl_vertex_program::TnlData fieldBrian Paul2009-09-241-7/+0
|/
* r300: Fix handling of NV_vertex_program parametersNicolai Hähnle2009-09-211-0/+1
| | | | | | | The handling is a bit inefficient, unfortunately, but I don't want to make any intrusive changes for Mesa 7.6. Signed-off-by: Nicolai Hähnle <[email protected]>
* mesa: additional instruction field size assertionsBrian Paul2009-08-261-0/+6
|
* mesa: silence warningBrian Paul2009-06-171-0/+2
|
* mesa: added _mesa_postprocess_program() to aid shader debuggingBrian Paul2009-06-171-0/+58
|
* mesa: add switch case for GL_VERTEX_STATE_PROGRAM_NV in _mesa_new_program()Brian Paul2009-04-181-0/+1
| | | | Fixes bug seen in progs/tests/vptest1.c
* mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul2009-02-281-3/+3
| | | | | | | 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).
* mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)Brian Paul2009-02-181-0/+9
| | | | | | | | Old limit was 256. Note that no arrays are declared to this size. The only place we have to be careful about raising this limit is the prog_src/dst_register Index bitfields. These have been bumped up too. Added assertions to check we don't exceed the bitfield in the future too.
* mesa: fix off-by-one bug in _mesa_delete_instructions()Brian Paul2009-01-091-1/+1
|
* Merge commit 'origin/master' into gallium-0.2Keith Whitwell2008-10-101-1/+5
|\ | | | | | | | | | | | | Conflicts: src/mesa/glapi/descrip.mms src/mesa/shader/grammar/descrip.mms
| * mesa: fix assertion in _mesa_reference_program()Brian Paul2008-09-261-1/+5
| |
* | Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell2008-10-101-5/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/gallivm/instructionssoa.cpp src/gallium/auxiliary/gallivm/soabuiltins.c src/gallium/auxiliary/rtasm/rtasm_x86sse.c src/gallium/auxiliary/rtasm/rtasm_x86sse.h src/mesa/main/texenvprogram.c src/mesa/shader/arbprogparse.c src/mesa/shader/prog_statevars.c src/mesa/state_tracker/st_draw.c src/mesa/vbo/vbo_exec_draw.c
| * | mesa: in _mesa_combine_programs() take new STATE_CURRENT_ATTRIB color into ↵Brian Paul2008-10-081-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | account Commit 1680ef869625dc1fe9cf481b180382a34e0738e7 changed the texenv program to get color from a state register instead of a constant-valued vertex attribute. This broke program concatenation (so glDraw/CopyPixels broke). Now check if the second program get's color from a constant register and handle that case appropriately.
* | | Merge branch 'master' into gallium-0.2Keith Whitwell2008-09-211-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/glapi/glapi.h src/mesa/main/api_exec.c src/mesa/main/attrib.c src/mesa/main/clear.c src/mesa/main/context.c src/mesa/main/mfeatures.h src/mesa/main/mipmap.c src/mesa/main/mipmap.h src/mesa/main/readpix.c src/mesa/main/sources src/mesa/main/state.c src/mesa/main/texformat.c src/mesa/main/texparam.c src/mesa/main/texstate.c src/mesa/vbo/vbo_context.c src/mesa/x86/common_x86_asm.S
| * | mesa: set point stateBrian Paul2008-09-211-0/+4
| | | | | | | | | | | | (cherry picked from commit af3d9dba562813ffed71691bffd7faf6665c4487)
| * | mesa: Use appropriate unsigned/signed, float/integer types.José Fonseca2008-09-211-1/+1
| | |
| * | mesa: move fixed function vertex program builder from tnl to core mesaKeith Whitwell2008-09-211-0/+6
| | | | | | | | | | | | | | | | | | Also unify caching of fragment and vertex programs in shader/prog_cache.c` Brought across from gallium-0.2
| * | mesa: prefix a bunch of #include lines with "main/".Brian Paul2008-09-181-3/+3
| | | | | | | | | | | | | | | This is another step toward removing a whole bunch of -I flags from the cc commands. Still need to address driver code...
* | | Merge branch 'gallium-0.1' into gallium-0.2Keith Whitwell2008-09-111-4/+13
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A first attempt at moving gallium onto a branch directly off master... It will be interesting to see how much work this takes to get running. Have resolved the conflicts semi-arbitarily, not compiled or tested. Conflicts: .gitignore Makefile configs/config.mgw configs/darwin configs/darwin-x86ppc configs/default configs/freebsd-dri configs/linux-dri configs/linux-dri-xcb configs/linux-fbdev configs/linux-static configs/linux-x86-64-static configs/linux-x86-static doxygen/Makefile include/GL/gl.h progs/demos/Makefile progs/demos/descrip.mms progs/demos/texenv.c progs/egl/.gitignore progs/egl/Makefile progs/glsl/.gitignore progs/glsl/Makefile progs/glsl/convolutions.c progs/samples/Makefile.mgw progs/tests/.gitignore progs/trivial/.gitignore progs/trivial/point-param.c progs/trivial/tri.c progs/xdemos/.gitignore progs/xdemos/glthreads.c src/egl/drivers/demo/Makefile src/egl/drivers/dri/Makefile src/egl/main/Makefile src/glu/Makefile src/glu/sgi/Makefile src/glu/sgi/Makefile.mgw src/glut/glx/Makefile.mgw src/glut/os2/WarpWin.cpp src/glut/os2/glut_cindex.cpp src/glut/os2/glut_gamemode.cpp src/glut/os2/glut_win.cpp src/glut/os2/glut_winmisc.cpp src/glut/os2/os2_glx.cpp src/glut/os2/os2_menu.cpp src/glut/os2/os2_winproc.cpp src/glw/Makefile src/glx/x11/dri_glx.c src/glx/x11/glxext.c src/mesa/Makefile src/mesa/Makefile.mgw src/mesa/descrip.mms src/mesa/drivers/beos/Makefile src/mesa/drivers/common/descrip.mms src/mesa/drivers/common/driverfuncs.c src/mesa/drivers/directfb/Makefile src/mesa/drivers/dri/Makefile.template src/mesa/drivers/dri/common/dri_bufmgr.c src/mesa/drivers/dri/common/dri_bufmgr.h src/mesa/drivers/dri/common/dri_util.c src/mesa/drivers/dri/common/extension_helper.h src/mesa/drivers/dri/common/mmio.h src/mesa/drivers/dri/common/utils.c src/mesa/drivers/dri/common/utils.h src/mesa/drivers/dri/glcore/Makefile src/mesa/drivers/dri/i810/i810screen.c src/mesa/drivers/dri/i915/intel_ioctl.c src/mesa/drivers/dri/i915/intel_ioctl.h src/mesa/drivers/dri/i915/intel_screen.c src/mesa/drivers/dri/i915/server/i830_common.h src/mesa/drivers/dri/i915/server/i830_dri.h src/mesa/drivers/dri/i965/intel_screen.c src/mesa/drivers/dri/i965/server/i830_common.h src/mesa/drivers/dri/i965/server/i830_dri.h src/mesa/drivers/dri/mach64/mach64_screen.c src/mesa/drivers/dri/nouveau/nouveau_context.h src/mesa/drivers/dri/nouveau/nouveau_fifo.c src/mesa/drivers/dri/nouveau/nouveau_fifo.h src/mesa/drivers/dri/nouveau/nouveau_screen.c src/mesa/drivers/dri/nouveau/nouveau_screen.h src/mesa/drivers/dri/r128/r128_tex.h src/mesa/drivers/dri/savage/savageioctl.h src/mesa/drivers/fbdev/Makefile src/mesa/drivers/osmesa/Makefile src/mesa/drivers/osmesa/descrip.mms src/mesa/drivers/x11/Makefile src/mesa/drivers/x11/descrip.mms src/mesa/drivers/x11/xm_dd.c src/mesa/glapi/glapi.c src/mesa/glapi/glthread.c src/mesa/main/api_validate.c src/mesa/main/attrib.c src/mesa/main/bufferobj.c src/mesa/main/bufferobj.h src/mesa/main/buffers.c src/mesa/main/config.h src/mesa/main/context.c src/mesa/main/descrip.mms src/mesa/main/drawpix.c src/mesa/main/enums.c src/mesa/main/fbobject.c src/mesa/main/glheader.h src/mesa/main/imports.c src/mesa/main/mipmap.c src/mesa/main/mm.c src/mesa/main/mm.h src/mesa/main/mtypes.h src/mesa/main/points.c src/mesa/main/sources src/mesa/main/state.c src/mesa/main/texcompress_fxt1.c src/mesa/main/texenvprogram.c src/mesa/main/texobj.c src/mesa/main/texstate.c src/mesa/main/texstore.c src/mesa/math/descrip.mms src/mesa/shader/arbprogram.c src/mesa/shader/descrip.mms src/mesa/shader/prog_execute.c src/mesa/shader/prog_statevars.c src/mesa/shader/prog_statevars.h src/mesa/shader/prog_uniform.c src/mesa/shader/program.c src/mesa/shader/program.h src/mesa/shader/shader_api.c src/mesa/shader/slang/descrip.mms src/mesa/shader/slang/library/slang_vertex_builtin_gc.h src/mesa/sources src/mesa/swrast/descrip.mms src/mesa/swrast/s_drawpix.c src/mesa/swrast/s_fragprog.c src/mesa/swrast/s_readpix.c src/mesa/swrast/s_span.c src/mesa/swrast_setup/descrip.mms src/mesa/tnl/descrip.mms src/mesa/tnl/t_context.h src/mesa/tnl/t_vp_build.c src/mesa/tnl/tnl.h src/mesa/vbo/descrip.mms src/mesa/vbo/vbo_context.c src/mesa/vbo/vbo_exec_array.c src/mesa/x86-64/xform4.S src/mesa/x86/rtasm/x86sse.c src/mesa/x86/rtasm/x86sse.h windows/VC6/progs/glut/glut.dsp windows/VC7/mesa/gdi/gdi.vcproj windows/VC7/mesa/glu/glu.vcproj windows/VC7/mesa/mesa.sln windows/VC7/mesa/mesa/mesa.vcproj windows/VC7/mesa/osmesa/osmesa.vcproj windows/VC7/progs/glut/glut.vcproj windows/VC8/mesa/gdi/gdi.vcproj windows/VC8/mesa/glu/glu.vcproj windows/VC8/mesa/mesa.sln windows/VC8/mesa/mesa/mesa.vcproj windows/VC8/progs/glut/glut.vcproj
| * mesa: set point stateBrian Paul2008-08-121-0/+4
| |
| * mesa: Prefix main includes with dir to avoid conflicts.José Fonseca2008-07-241-3/+3
| | | | | | | | | | Some of the headers in src/mesa/main have pretty common names which easily conflict with third-party code, e.g. config.h
| * mesa: refactor: move _mesa_Bind/Gen/DeleteProgram() to arbprogram.cBrian2008-07-211-208/+1
| | | | | | | | No API-level functions now in program.c.
| * mesa: Use appropriate unsigned/signed, float/integer types.José Fonseca2008-06-241-1/+1
| |
| * fix tempReg test in _mesa_combine_programs()Brian Paul2008-05-191-1/+1
| |
| * fix some additional program refcounting bugsBrian Paul2008-05-141-3/+2
| | | | | | | | cherry-picked from master
| * gallium: implement full reference counting for vertex/fragment programsBrian Paul2008-05-071-35/+68
| | | | | | | | | | | | | | | | 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
| * mesa: added _mesa_insert_instructions()Brian2008-04-071-10/+50
| | | | | | | | Also, use new _mesa_free_instructions() in a few places.
| * gallium: make sure to set the SamplersUsed field for bitmap/drawpixels shadersBrian Paul2008-04-041-0/+2
| | | | | | | | | | Also, make sure that field is copied/updated in the program clone and combine functions. Without this we weren't getting SAMP declarations in the TGSI shaders.
| * mesa: fix some issues in _mesa_combine_programs()Brian Paul2008-03-251-2/+21
| | | | | | | | | | | | Use a temporay register to connect outputs of first program to inputs of second program. Also, fix bug in replace_registers(): didn't search/replace DstReg.
| * use ctx->Driver.DeleteProgram() in a few more placesBrian2008-03-221-1/+1
| |
| * copy UsesKill state in _mesa_combine_programs()Brian2008-01-161-0/+7
| |
| * free program cachesBrian2008-01-011-0/+2
| |
| * alloc caches for fixed-func vertex/fragment progsBrian2007-10-311-0/+4
| |
| * fix InputsRead bug in _mesa_combine_programs()Brian2007-10-301-2/+6
| |
| * make _mesa_combine_programs() params constBrian2007-10-301-1/+2
| |
| * Added _mesa_combine_programs() for concatenating two programs.Brian2007-10-301-0/+149
| |
| * Re-implement GLSL texture sampler variables.Brian2007-10-261-0/+5
| | | | | | | | | | | | | | | | | | | | GLSL sampler variables indicate which texture unit to use for TEX instructions. Previously, this was baked into the fragment/vertex program and couldn't be readily changed once set. Now, SamplerUnits[] array indicates which texture unit is to be used for each sampler variable. These values are set with glUniform1i(). This is extra state that must be passed to the fragment/vertex program executor at runtime.
| * call ctx->Driver.NewProgram() instead of _mesa_new_program()Brian2007-07-241-1/+1
| |
* | mesa: refactor: move _mesa_Bind/Gen/DeleteProgram() to arbprogram.cBrian Paul2008-07-291-208/+1
| | | | | | | | No API-level functions now in program.c.
* | r500: Add "Not quite SSA" and dead code elimination passNicolai Haehnle2008-07-121-7/+54
| | | | | | | | In addition, this pass fixes non-native swizzles.