summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'origin/gallium-master-merge'Brian Paul2009-02-101-2/+62
|\ | | | | | | | | | | | | | | | | | | | | | | This is the big merge of the gallium-0.2 branch into master. gallium-master-merge was just the staging area for it. Both gallium-0.2 and gallium-master-merge are considered closed now. Conflicts: progs/demos/Makefile src/mesa/main/state.c src/mesa/main/texenvprogram.c
| * mesa: Remove _Active and _UseTexEnvProgram flags from fragment programs.Eric Anholt2009-01-091-11/+0
| | | | | | | | | | | | | | | | There was a note in state.c about _Active deserving to die, and there were potential issues with it due to i965 forgetting to set _UseTexEnvProgram. Removing both simplifies things. Reviewed-by: Brian Paul <[email protected]>
| * mesa: remove unneeded _mesa_reference_fragprog() callBrian Paul2008-12-181-4/+2
| | | | | | | | The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
| * mesa: fix generation of fixed function state when no vp existsAlan Hourihane2008-11-131-43/+41
| |
| * Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell2008-10-151-3/+26
| |\ | | | | | | | | | | | | | | | Conflicts: src/mesa/main/context.c
| | * mesa: new _mesa_set_vp_override() function for driver-override of vertex programBrian Paul2008-10-101-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | Patch provide by Keith. Used in state tracker by DrawPixels to indicate that the state tracker (driver) is using its own vertex program. This prevents the texenvprogram code from replacing conventional shader inputs with state vars. Fixes glDraw/CopyPixels regressions.
| * | Merge commit 'origin/master' into gallium-0.2Keith Whitwell2008-10-101-6/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/glapi/descrip.mms src/mesa/shader/grammar/descrip.mms
| * \ \ Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell2008-10-101-1/+41
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: replace GLuint with GLbitfield to be clearer about usageBrian Paul2008-10-071-1/+1
| | | | | | | | | | | | | | | | Also, fix up some comments to be doxygen style.
| | * | mesa: avoid generating constant vertex attributes in fixedfunc programsKeith Whitwell2008-10-031-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of enabled/active vertex attributes. Keep track of potential vertex program outputs. When generating fragment program, replace references to fragment attributes which are effectively non-varying and non-computed passthrough attributes with references to the new CURRENT_ATTRIB tracked state value. Only downside is slight ugliness in VBO code where we need to validate state twice in succession.
| | * | mesa: add new internal state for tracking current vertex attribsKeith Whitwell2008-10-031-0/+4
| | | |
| | * | mesa: fix MSAA enable state in update_multisample()Brian Paul2008-09-151-4/+4
| | | |
| * | | Merge branch 'master' into gallium-0.2Keith Whitwell2008-09-211-2/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * \ \ \ Merge commit 'origin/master' into gallium-0.2Keith Whitwell2008-09-181-4/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: progs/trivial/Makefile src/mesa/glapi/glthread.c
| * | | | | mesa: get fixed-function program generation working againKeith Whitwell2008-09-121-20/+42
| | | | | |
| * | | | | Merge branch 'gallium-0.1' into gallium-0.2Keith Whitwell2008-09-111-806/+37
| |\ \ \ \ \ | | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: fix issues around multisample enableRoland Scheidegger2008-07-021-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multisample enable is enabled by default, however gl mandates multisample rendering rules only apply if there's also a multisampled buffer.
| | * | | | mesa: point size arraysBrian Paul2008-06-251-1/+1
| | | | | |
| | * | | | mesa: refactor: move #define FEATURE flags into new mfeatures.h fileBrian Paul2008-06-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Also, check the FEATURE flags in many places.
| | * | | | mesa: refactor: move _mesa_init_exec_table() into new api_exec.c fileBrian Paul2008-06-091-796/+7
| | | | | |
| | * | | | mesa: refactor: move glReadPixels code into new readpix.c fileBrian Paul2008-06-091-2/+3
| | | | | |
| | * | | | mesa: refactor: move glPixelStore function into new pixelstore.c fileBrian Paul2008-06-091-0/+1
| | | | | |
| | * | | | mesa: remove EXT/NV suffixes from _mesa_PointParameter functionsBrian Paul2008-06-051-4/+4
| | | | | |
| | * | | | mesa: evaluate _NeedEyeCoords prior to generating internal vertex shaderKeith Whitwell2008-05-241-12/+14
| | | | | |
| | * | | | alias ProgramEnvParameter4xyARB and ProgramParameter4xyNV (bug #12935)Brian Paul2008-05-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | these should be the same functions (as per spec). cherry-picked from master (86a4810b09097714942bf2b889e6c62357bba931)
| | * | | | gallium: implement full reference counting for vertex/fragment programsBrian2008-05-061-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
| | * | | | Alias glStencilOpSeparateATI with glStencilOpSeparate.Brian2008-04-041-1/+0
| | | | | |
| | * | | | Finish up ATI_separate_stencilBrian2008-04-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add entrypoints to glapi XML file and regenerate files. Implement glStencilOpSeparateATI(). Consolidate some code in stencil.c
| | * | | | more flags for MaintainTnlProgram case, update #includesBrian2007-10-311-2/+4
| | | | | |
| | * | | | Set _NEW_BUFFERS in glRead/DrawBuffer().Brian2007-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we set _NEW_PIXEL and _NEW_COLOR in these functions, respectively. That correponds to the GL attribute groups, but doesn't make much sense otherwise. This could improve validation efficiency in a few places too. It looks like all the drivers are already checking for _NEW_BUFFERS in the right places (since that's the bit for FBO state) so we can trim out _NEW_PIXEL and _NEW_COLOR at any time.
| | * | | | Rewrite update_program() to use _mesa_get_fixed_func_fragment/vertex_program().Brian2007-10-291-52/+74
| | | | | |
* | | | | | mesa: another fix for program/texture state validationBrian Paul2009-02-101-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced in 46ae1abbac6837d051c10b2e8b57eab3d4958ff4 Break program validation into two steps, do part before texture state validation and do the rest after: 1. Determine Vertex/Fragment _Enabled state. 2. Update texture state. 3. Determine pointers to current Vertex/Fragment programs (which may involve generating new "fixed-function" programs). See comments in the code for more details of the dependencies.
* | | | | | mesa: s/_IMAGE_NEW_TRANSFER_STATE/_MESA_NEW_TRANSFER_STATE/ to be more ↵Brian Paul2009-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | consistant with other flags
* | | | | | mesa: fix/change state validation order for program/texture stateBrian Paul2009-02-101-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Program state needs to be updated before texture state since the later depends on the former. Fixes piglit texgen failure. The second time through the modes (press 't' three times) we disable the fragment program and return to conventional texture mode. State validation failed here because update_texture() saw stale fragment program state.
* | | | | | mesa: Remove _Active and _UseTexEnvProgram flags from fragment programs.Eric Anholt2009-01-071-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a note in state.c about _Active deserving to die, and there were potential issues with it due to i965 forgetting to set _UseTexEnvProgram. Removing both simplifies things. Reviewed-by: Brian Paul <[email protected]>
* | | | | | mesa: remove unneeded _mesa_reference_fragprog() callBrian Paul2008-12-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
* | | | | | mesa: fix generation of fixed function state when no vp existsAlan Hourihane2008-11-131-43/+41
| |_|_|_|/ |/| | | |
* | | | | mesa: remove invalid assertions that programs have parametersBrian Paul2008-09-261-6/+0
| |_|_|/ |/| | | | | | | | | | | Fixes failure with demos/fplight.c
* | | | mesa: refactor: move #define FEATURE flags into new mfeatures.h fileKeith Whitwell2008-09-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, check the FEATURE flags in many places. (cherry picked from commit 40d1a40f294f1ed2dacfad6f5498322fc08cc2d1) Conflicts: src/mesa/main/config.h src/mesa/main/context.c src/mesa/main/texobj.c src/mesa/main/texstate.c src/mesa/main/texstore.c
* | | | mesa: refactor: move _mesa_init_exec_table() into new api_exec.c fileBrian Paul2008-09-211-796/+7
| | | | | | | | | | | | | | | | (cherry picked from commit b36e6f0baf64491772b8e1a1cddf68a7dcf8ee22)
* | | | mesa: refactor: move glReadPixels code into new readpix.c fileBrian Paul2008-09-211-2/+3
| | | |
* | | | mesa: refactor: move glPixelStore function into new pixelstore.c fileBrian Paul2008-09-211-0/+1
| | | |
* | | | mesa: remove EXT/NV suffixes from _mesa_PointParameter functionsBrian Paul2008-09-211-4/+4
| | | |
* | | | mesa: move fixed function vertex program builder from tnl to core mesaKeith Whitwell2008-09-211-32/+66
| |_|/ |/| | | | | | | | | | | | | | Also unify caching of fragment and vertex programs in shader/prog_cache.c` Brought across from gallium-0.2
* | | mesa: fix MSAA enable state in update_multisample()Brian Paul2008-09-151-4/+4
|/ /
* | mesa: fix issues around multisample enableRoland Scheidegger2008-07-021-0/+17
| | | | | | | | | | multisample enable is enabled by default, however gl mandates multisample rendering rules only apply if there's also a multisampled buffer.
* | implement full reference counting for vertex/fragment programsBrian2008-05-061-9/+19
| | | | | | | | | | Use _mesa_reference_vert/fragprog() wherever we assign program pointers. Fixes a memory corruption bug found with glean/api2 test.
* | fix mistakenly set ATIFragmentShader._Enabled bit (bug 15269)Roland Scheidegger2008-04-011-1/+1
| |
* | alias ProgramEnvParameter4xyARB and ProgramParameter4xyNV (bug #12935)Roland Scheidegger2007-11-091-4/+4
| | | | | | | | these should be the same functions (as per spec).
* | Alias glStencilOpSeparateATI with glStencilOpSeparate.Brian2007-10-301-1/+0
| |