summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add missing return when out of memoryBrian Paul2009-10-011-0/+1
|
* ARB sync: Add support for GL_ARB_sync to swrastIan Romanick2009-09-031-0/+12
| | | | | This isn't quite right yet. The delete behavior and the context clean-up needs some work.
* ARB prog: Change handling of program parameter limitsIan Romanick2009-08-261-10/+12
| | | | | | | | | | | | | | | | | Several changes are made to program parameter limits. Several of the non-NATIVE limits are set higher. All of the NATIVE limits are set to zero in the core Mesa code. Each driver must set the actual value in its context creation routine. If the NATIVE value remains zero, this indicates that hardware shaders may not be supported. Each of the preceeding changes matches the bahavior of Apple's shader assembler, so it seems safe. Finally, we limit the value of MaxEnvParams to be no greater than MaxNativeAttribs. At least one case has been found where an application does the wrong thing if MaxNativeAttribs < MaxEnvParams. See also bugzilla #23490.
* mesa: validate shader before drawing (for debugging, disabled)Brian Paul2009-08-251-0/+10
|
* mesa: append uniform values to the log file the first time we use a shaderBrian Paul2009-08-141-0/+27
| | | | | This info is essential to using/debugging a shader outside of its normal application.
* mesa: new _mesa_valid_to_render() functionBrian Paul2009-08-141-0/+42
| | | | | Tests if the current shader/program is valid and that the framebuffer is complete. To be called by glBegin, glDrawArrays, etc.
* Merge branch 'arb_vertex_array_object'Brian Paul2009-06-261-0/+1
|\
| * mesa: move vertex array objects from shared state to per-contextBrian Paul2009-06-191-0/+1
| | | | | | | | | | The ARB version requires VAOs to be per-context while the Apple extension was ambiguous.
* | Merge branch 'mesa_7_5_branch'Brian Paul2009-06-241-12/+29
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/i915/i915_tex_layout.c src/mesa/drivers/dri/i965/brw_wm_glsl.c src/mesa/drivers/dri/intel/intel_buffer_objects.c src/mesa/drivers/dri/intel/intel_pixel_bitmap.c src/mesa/drivers/dri/intel/intel_pixel_draw.c src/mesa/main/enums.c src/mesa/main/texstate.c src/mesa/vbo/vbo_exec_array.c
| * mesa: rework viewport/scissor initialization codeBrian Paul2009-06-171-12/+29
| | | | | | | | | | | | | | | | | | | | The first time a context is bound to a drawable, the viewport and scissor bounds are initialized to the buffer's size. This is actually a bit tricky. A new _mesa_check_init_viewport() function is called in several places to check if the viewport has been initialized. We also use a new ctx->ViewportInitialized flag instead of the overloaded ctx->FirstTimeCurrent flag.
* | Merge branch 'ext-provoking-vertex'Brian Paul2009-06-191-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: docs/relnotes-7.6.html progs/tests/Makefile src/gallium/drivers/softpipe/sp_prim_vbuf.c src/glx/x11/indirect.c src/mesa/glapi/Makefile src/mesa/glapi/dispatch.h src/mesa/glapi/glapioffsets.h src/mesa/glapi/glapitable.h src/mesa/glapi/glapitemp.h src/mesa/glapi/glprocs.h src/mesa/main/dlist.c src/mesa/main/enums.c src/mesa/sparc/glapi_sparc.S src/mesa/x86-64/glapi_x86-64.S src/mesa/x86/glapi_x86.S
| * | mesa: data structure updates for GL_EXT_provoking_vertexBrian Paul2009-05-281-0/+3
| | |
* | | Merge branch 'mesa_7_5_branch'Brian Paul2009-06-041-0/+10
|\ \ \ | | |/ | |/| | | | | | | | | | Conflicts: src/mesa/main/context.c
| * | mesa: release VBO and PBO references upon context destructionBrian Paul2009-06-021-0/+10
| | |
* | | Merge branch 'mesa_7_5_branch'Brian Paul2009-06-011-3/+5
|\| | | |/ |/|
| * mesa: Add success/failures return value to _mesa_make_current.José Fonseca2009-05-301-3/+5
| |
| * mesa: delete array objects before buffer objects during context tear-downBrian Paul2009-05-131-1/+2
| | | | | | | | The former may point to the later.
| * mesa: Make _mesa_share_state thread safe.José Fonseca2009-05-081-2/+9
| |
| * mesa: more complete fix for transform_invarient glitchesKeith Whitwell2009-05-081-0/+13
| | | | | | | | | | | | Add a new flag mvp_with_dp4 in the context, and use that to switch both ffvertex.c and programopt.c vertex transformation code to either DP4 or MUL/MAD implementations.
* | mesa: use Elements() for loop limitBrian Paul2009-05-221-1/+1
| |
* | mesa: assertions to check for too many vertex outputs or fragment inputsBrian Paul2009-05-081-0/+4
| |
* | mesa: Make _mesa_share_state thread safe.José Fonseca2009-05-081-2/+9
| |
* | mesa: move the NullBufferObj from GLcontext to gl_shared_stateBrian Paul2009-05-071-3/+0
| | | | | | | | | | Since shared array objects may point to the null/default buffer object, the null/default buffer object should be part of the shared state.
* | mesa: more complete fix for transform_invarient glitchesKeith Whitwell2009-05-051-0/+13
|/ | | | | | Add a new flag mvp_with_dp4 in the context, and use that to switch both ffvertex.c and programopt.c vertex transformation code to either DP4 or MUL/MAD implementations.
* mesa/main: protect driver.finish with FLUSH_CURRENTKeith Whitwell2009-04-281-0/+1
| | | | Already doing this for driver.flush()
* mesa: fix up error/warning/debug output newlinesBrian Paul2009-04-241-1/+1
| | | | | | | | | | As of commit 23ad86cfb91c294ce85a3116d4b825aaa3988a6e all messages go through output_if_debug(). Add new parameter to output_if_debug() to indicate whether to emit a newline. _mesa_warning() and _mesa_error() calls should not end their strings with \n. _mesa_debug() calls should end their text with \n.
* mesa: protect driver.flush() with FLUSH_CURRENTKeith Whitwell2009-04-221-1/+2
| | | | | | Need to do this to ensure vbo code unmaps its buffers before calling the driver, which may be sitting on top of a memory manager which objects to firing commands from a mapped buffer.
* mesa: suppress extra newlineBrian Paul2009-04-171-1/+1
|
* mesa: update/fix doxygen commentsVinson Lee2009-03-171-2/+2
|
* mesa: add support for ATI_envmap_bumpmapRoland Scheidegger2009-03-121-0/+3
| | | | | | | | add new entrypoints, new texture format, etc translate in texenvprogram.c for drivers using the mesa-generated tex env fragment program also handled in swrast, but not tested (cannot work due to negative texel results not handled correctly)
* mesa: move shared context state functions to new shared.c fileBrian Paul2009-03-071-366/+15
|
* 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: Reads must also be done with lock held.José Fonseca2009-03-061-3/+5
| | | | Otherwise two threads might think each made the refcount go zero.
* mesa: call _mesa_get_cpu_features() during one-time-initBrian Paul2009-03-041-0/+3
|
* mesa: convert some #defines to enumsBrian Paul2009-02-281-0/+32
| | | | | | | | | | | | This makes debugging with gdb a bit easier. Ex: (gdb) p ctx->DrawBuffer.Attachment[BUFFER_STENCIL] Note however that gdb only seems to recognize enum types that are actually used to declare a variable somewhere. For example, gl_buffer_index isn't used to declare any vars so it's invisible to gdb. Work around this by adding a dummy function in context.c that declares some vars with these new types.
* mesa: Resurrect SPARC asm code.David S. Miller2009-02-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rewrites the sparc GLAPI code so that it's PIC friendly and works with all of the TLS/PTHREADS/64-bit/32-bit combinations properly. As a result we can turn SPARC asm back on. Currently it's only enabled on Linux, as that's the only place where I can test this stuff out. For the moment the cliptest SPARC asm routines are disabled as they are non-working. The problem is that they use register %g7 as a temporary which is where the threading libraries store the thread pointer on SPARC. I will fix that code up in a future change as it's a pretty important routine to optimize. Like x86 we do the runtime patch as a pthread once-invoked initializer in init_glapi_relocs(). Unlike x86, however, our GLAPI stubs on SPARC are just two instruction sequences that branch to a trampoline and put the GLAPI offset into a register. The trampoline is what we run-time patch. The stubs thus all look like: glFoo: ba __glapi_sparc_foo_stub sethi GLAPI_OFFSET(glFOO) * PTR_SIZE, %g3 This actually makes generate_entrypoint() a lot simpler on SPARC. For this case in generate_entrypoint() we generate stubs using a 'call' instead of the 'ba' above to make sure it can reach. In order to get a proper tail call going here, in the unpatched case, we do several tricks. To get the current PC, for example, we save the return address register into a temporary, do a call, save the return address register written by the call to another temporary, then restore the original return address register value. This is to avoid having to allocate a stack frame. This is necessary for PIC address formation. This new GLAPI scheme lets us get rid of the ugly SPARC GLAPI hacks in __glXInitialize() and one_time_init(). Signed-off-by: David S. Miller <[email protected]>
* mesa: move a bunch of compiler-related stuff into new compiler.h headerBrian Paul2009-02-221-0/+1
| | | | This trims down and cleans up imports.h and glheader.h quite a bit.
* mesa: use enums for TEXTURE_x_INDEX valuesBrian Paul2009-02-211-5/+6
| | | | | Plus, put them in the order of highest to lowest priority to simplify the texture_override() loop.
* mesa: use an array for default texture objectsBrian Paul2009-02-211-49/+26
| | | | | Replace Default1D/2D/3D/Cube/etc with DefaultTex[TEXTURE_x_INDEX]. The same should be done with the Current1D/2D/3D/etc pointers...
* mesa: add additional texture size/limit assertionsBrian Paul2009-02-131-5/+13
|
* mesa: restore FLUSH_VERTICES() in _mesa_notifySwapBuffers()Brian Paul2009-02-121-0/+1
|
* mesa: get rid of _math_init()Brian Paul2009-02-111-7/+0
| | | | | | | | | | | Only VBO uses the evaluator code so call _math_init_eval() there. Only TNL uses the transform/translate code so call _math_init_transformation() and _math_init_translate9) there. This is a step toward resolving some symbol collisions between Mesa's and gallium's x86 codegen. Have VBO and TNL modules call _math_init_transformation()
* Merge commit 'origin/gallium-master-merge'Brian Paul2009-02-101-34/+52
|\ | | | | | | | | | | | | | | | | | | | | | | 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: merge gallium-0.2 into gallium-master-mergeBrian Paul2009-02-091-34/+52
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'origin/gallium-0.2' into gallium-master-merge Conflicts: Makefile docs/relnotes-7.4.html docs/relnotes.html src/mesa/drivers/dri/i965/brw_wm.h src/mesa/main/imports.c src/mesa/main/mtypes.h src/mesa/main/texcompress.c src/mesa/main/texenvprogram.c src/mesa/main/version.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_draw.c
| | * mesa: Remove _Active and _UseTexEnvProgram flags from fragment programs.Eric Anholt2009-01-091-1/+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]>
| | * Merge commit 'origin/master' into gallium-0.2Brian Paul2009-01-021-10/+10
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/main/ffvertex_prog.c src/mesa/main/texenvprogram.c
| | * \ Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell2008-10-151-0/+1
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/main/context.c
| | | * | mesa: modify fixed function vertex programs not to reference constant attributesKeith Whitwell2008-10-141-0/+1
| | | | |
| | | * | mesa: fix/simplify initialization of vertex/fragment program limitsBrian Paul2008-09-251-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defaults for program length, num ALU instructions, num indirections, etc. basically indicate no limit for software rendering. Driver should override as needed.
| | * | | mesa: fix/simplify initialization of vertex/fragment program limitsBrian Paul2008-09-261-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defaults for program length, num ALU instructions, num indirections, etc. basically indicate no limit for software rendering. Driver should override as needed.