summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: consolidate code in _mesa_update_array_max_element()Brian Paul2011-04-061-31/+2
|
* mesa: implement clamping controls (ARB_color_buffer_float)Marek Olšák2011-03-291-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <[email protected]> mesa: fix getteximage so that it doesn't clamp values mesa: update the compute_version function mesa: add display list support for ARB_color_buffer_float mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float commit b2f6ddf907935b2594d2831ddab38cf57a1729ce Author: Luca Barbieri <[email protected]> Date: Tue Aug 31 16:50:57 2010 +0200 mesa: document known possible deviations from ARB_color_buffer_float commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:54:56 2010 +0200 mesa: expose GL_ARB_color_buffer_float commit aef5c3c6be6edd076e955e37c80905bc447f8a82 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:12:34 2010 +0200 mesa, mesa/st: handle read color clamping properly (I'll squash the st/mesa part to a separate commit. -Marek) We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where the operation mandates it. TODO: did I get the set of operations mandating it right? commit 3a9cb5e59b676b6148c50907ce6eef5441677e36 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:09:41 2010 +0200 mesa: respect color clamping in texenv programs (v2) Changes in v2: - Fix attributes other than vertex color sometimes getting clamped commit de26f9e47e886e176aab6e5a2c3d4481efb64362 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:05:53 2010 +0200 mesa: restore color clamps on glPopAttrib commit a55ac3c300c189616627c05d924c40a8b55bfafa Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:04:26 2010 +0200 mesa: clamp color queries if and only if fragment clamping is enabled commit 9940a3e31c2fb76cc3d28b15ea78dde369825107 Author: Luca Barbieri <[email protected]> Date: Wed Aug 25 00:00:16 2010 +0200 mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY To do this, we make ClampColor call FLUSH_VERTICES with the appropriate _NEW flag. We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging effects, despite being in the Color attrib group. This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g commit 6244c446e3beed5473b4e811d10787e4019f59d6 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 17:58:24 2010 +0200 mesa: add unclamped color parameters
* mesa: remove _MESA_NEW_TRANSFER_STATEBrian Paul2011-03-231-1/+1
|
* Revert "mesa: Convert fixed function fragment program generator to GLSL IR."Eric Anholt2011-03-121-8/+4
| | | | | This reverts commit 7cb87dffce2c7a37f960f3a865cf92fd193dd8c5. There were regressions (Bug #35244) and more review has been requested.
* Revert "mesa: Track a computed _CurrentFragmentProgram for current ↵Eric Anholt2011-03-121-9/+4
| | | | | | gl_shader_program" This reverts commit b4452c3baad6e0379eeb7f22f2e51d13999e1323.
* mesa: Track a computed _CurrentFragmentProgram for current gl_shader_programEric Anholt2011-03-111-4/+9
| | | | | | | This is like how we track FragmentProgram._Current for the computed ARB fragment program for fixed function texenv, but this gives direct access to the gl_shader_program for drivers to codegen from, skipping ARB_fp.
* mesa: Convert fixed function fragment program generator to GLSL IR.Eric Anholt2011-03-111-4/+8
| | | | | | | | This is a step towards providing a direct route for drivers accepting GLSL IR for codegen. Perhaps more importantly, it runs the fixed function fragment program through the GLSL IR optimization. Having seen how easy it is to make ugly fixed function texenv code that can do unnecessary work, this may improve real applicatinos.
* mesa: replace NEED_SECONDARY_COLOR(), RGBA_LOGICOP_ENABLED() with inlinesBrian Paul2011-03-111-3/+3
| | | | and rename them.
* vbo: bind arrays only when necessaryMarek Olšák2011-02-141-0/+2
| | | | | We don't need to call bind_arrays in the vbo module if the states which the function depends on are not dirty.
* mesa: remove unneeded DD_POINT_SIZE and DD_LINE_WIDTH tricapsRoland Scheidegger2010-11-101-4/+0
| | | | | | | | DD_POINT_SIZE was broken for quite some time, and the only driver (r200) relying on this no longer needs it. Both DD_POINT_SIZE and DD_LINE_WIDTH have no users left outside of debugging output, hence instead of fixing DD_POINT_SIZE setting just drop both of them - there was a plan to remove tricaps flags entirely at some point.
* Track separate programs for each stageIan Romanick2010-10-271-7/+9
| | | | | 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-16/+16
|
* mesa: make the number of draw buffers part of the texenv program key stateBrian Paul2010-07-021-1/+1
| | | | | | | | All the state that effects the program should be in the key. This didn't help with bug 28169 but is a good fix anyway. NOTE: this is a low-priority candidate for the 7.8 branch. In practice, this issue might never be hit.
* mesa: initial support for ARB_geometry_shader4Zack Rusin2010-06-281-1/+29
| | | | | | 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
|
* mesa: update_arrays() depends on program state.Henri Verbeet2010-04-051-3/+2
| | | | | | It uses ctx->VertexProgram._Current. Signed-off-by: Brian Paul <[email protected]>
* Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg2010-02-191-1/+1
|
* mesa: remove redundant _MaxElement computationBrian Paul2010-01-261-6/+0
| | | | | | | | Eric added some new code to check if offset < obj_size before computing _MaxElement but my original code was still present afterward and it clobbered the _MaxElement value. Not sure if this came from a bad merge or what.
* mesa: Remove unnecessary header from state.c.Vinson Lee2010-01-181-1/+0
|
* mesa/main: Make FEATURE_pixel_transfer follow feature conventions.Chia-I Wu2009-09-241-4/+0
| | | | | As shown in mfeatures.h, this allows users of pixel.h to work without knowing if the feature is available.
* mesa: use a more logical flag in _mesa_set_vp_override()Brian Paul2009-08-071-1/+1
|
* texenv: Add missing dependency on VP changes.Eric Anholt2009-08-031-1/+2
| | | | | Funny thing is I annotated this dependency in e5f63c403b767f9974e8eb5d412c012b8a69287f, but didn't actually use it.
* texenv: Calculate whether we need to do secondary color on our own.Eric Anholt2009-07-161-1/+1
| | | | | | | | The _TriangleCaps bit is deprecated, not updated when we require, and is set based on state that hasn't been updated at that point in _mesa_update_state_locked(). Fixes incorrect clear color in glsl/twoside.c with meta_clear_tris.
* Fix state flag dependencies for fixed function fragment program updates.Eric Anholt2009-07-141-1/+1
| | | | | I started looking into why _NEW_ARRAY punishes us, and while annotating dependencies noticed that a bunch of dependencies were missing.
* Cap array elements at 0 when passed an invalid pointer for an array object.Eric Anholt2009-07-071-0/+10
| | | | | | | Otherwise, a pointer greater than the size would underflow and give a large maximum element. Reviewed-by: Brian Paul <[email protected]> (previous version)
* mesa: add missing update_min() call in update_arrays()Brian Paul2009-05-221-1/+1
|
* Merge branch 'mesa_7_5_branch'Brian Paul2009-05-221-2/+2
|\
| * mesa: fix loop over generic attribs in update_arrays()Brian Paul2009-05-221-1/+1
| |
* | mesa: move gl_array_attrib::_MaxElement to gl_array_object::_MaxElementBrian Paul2009-05-211-1/+1
| | | | | | | | This value is per array object.
* | mesa: Compute gl_client_array->_MaxElement during array validationBrian Paul2009-05-071-27/+61
| | | | | | | | | | | | Used to be done in the glVertex/Normal/Color/etc/Pointer() calls but if the VBO was reallocated the size could change. New _NEW_BUFFER_OBJECT state flag.
* | mesa: use local var to make code a bit more conciseBrian Paul2009-05-071-36/+37
|/
* mesa: new _NEW_PROGRAM_CONSTANTS flagBrian Paul2009-04-211-1/+35
| | | | | | | | | | | | | | | This state flag will be used to indicate that vertex/fragment program constants have changed. _NEW_PROGRAM will be used to indicate changes to the vertex/fragment shader itself, or misc related state. _NEW_PROGRAM_CONSTANTS is also set whenever a program parameter that's tracking GL state has changed. For example, if the projection matrix is in the parameter list, calling glFrustum() will cause _NEW_PROGRAM_CONSTANTS to be set. This will let to remove the need for dynamic state atoms in some drivers. For now, we still set _NEW_PROGRAM in all the places we used to. We'll no longer set _NEW_PROGRAM in glUniform() after drivers/etc have been updated.
* mesa: Update texenv program when _NEW_ARRAYS is updated as well.Eric Anholt2009-04-151-1/+2
| | | | | | | | | | This fixes a regression in fbotest1 on 915, where a transition from color+vertex array enabled to texcoord0+vertex array enabled wouldn't trigger program update on the second _mesa_update_state of DrawArrays, and we'd sample a constant texcoord of 0,0,0,1 instead of the array. The double state update in DrawArrays from 1680ef869625dc1fe9cf481b180382a34e0738e7 still needs fixing.
* mesa: move glViewport and glDepthRange functions into new viewport.c fileBrian Paul2009-03-071-0/+1
| | | | A bit of refactoring with an eye toward ES2 and GL 3.1
* mesa: fix sw fallback state validation bugBrian Paul2009-03-031-10/+28
| | | | | | | | When a hw driver fell back to swrast, swrast wasn't always getting informed of program changes. When fixed function is translated into shaders, flags like _NEW_LIGHT, _NEW_TEXTURE, etc. should really signal _NEW_PROGRAM. In this case, swrast wasn't seeing _NEW_PROGRAM when new fragment shaders were generated.
* mesa: add ctx->Stencil._Enabled fieldBrian Paul2009-03-021-1/+1
| | | | Only true if stenciling is enabled, and there's a stencil buffer.
* 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