summaryrefslogtreecommitdiff
path: root/src/mesa/main/context.c
AgeCommit message (Collapse)Author
2008-05-19Fix program refcounting assertion failure during context tear-downBrian Paul
When purging the program hash table, the refcount _should_ be one since the program is referenced by the hash table. Need to explicitly set to zero before calling delete(). Also, purge high-level shader hash tables before low-level program hash tables.
2008-05-06implement full reference counting for vertex/fragment programsBrian
Use _mesa_reference_vert/fragprog() wherever we assign program pointers. Fixes a memory corruption bug found with glean/api2 test.
2008-04-23drop stray includes of glapiGeorge Sapountzis
2008-03-31mesa: Free all shader program data before deleting allXiang, Haihao
shader/shader program objects to avoid memory access error.
2008-03-31Revert "mesa: separate shader program object from shader object." (bug#15244)Xiang, Haihao
This reverts commit 3ffd11f71d021f672b9bc15b3c39c155a0e2fecb.
2008-03-22delete default programs with ctx->Driver.DeleteProgram()Brian
2008-03-09init vertex weight attrib to (1,0,0,0)Markus Amsler
2008-02-28mesa: separate shader program object from shader object.Xiang, Haihao
Currently a callback delete_shader_cb is used for deleting shader and shader program objects. Mesa detaches all attached shaders in _mesa_free_shader_program_data when deleting shader program objects. However it is likely that these shaders have been freed in _mesa_free_shader, which will result in unexpected behaviour. This fix uses a single callback for shader program objects and deletes shader program objects before shader objects.
2008-01-30check if fb->Delete is null (bugs 13507,14293)Brian
2008-01-01remove unneeded conditionalBrian
2007-11-30fix broken two-sided stencilBrian
2007-09-11In _mesa_make_current(), don't unbind FBOs from the old context.Brian
This fixes the X server crash reported by KeithP on Aug 29. The old context's FBOs will be unreferenced during context destruction so there's no memleak with this change.
2007-08-23For _mesa_share_state(), update the context's references to the new share ↵Brian
group's objects (Shane Blackett)
2007-08-18remove dead code left over after fixing GL_READ/DRAW_BUFFER state issuesBrian
2007-08-16Rework the GL_READ_BUFFER, GL_DRAW_BUFFER state repairs that Roland ↵Brian
previously did. Basically, in update_framebuffer() (which should be called after an FBO is bound with MakeCurrent or BindFramebuffer) we check if the FBO is a window-system FBO. If it is, update the FBO's GL_READ/DRAW_BUFFER state according to the context state. Old code still in place but disabled with #if 0 / #endif.
2007-08-16Bring over the texobj refcounting changes from mesa_7_0_branchBrian
2007-08-14Fix a few more problems with freeing FBOs/textures during context destruction.Brian
Free FBOs before textures since the later may be referenced by the former. Need to bind the context we're destroying if there isn't a current context so that ctx->DeleteTexture() etc can be used.
2007-08-13free any render/framebuffers left in hash tables when freeing shared stateBrian
2007-08-13Implement mutex/locking around texture object reference counting.Brian
Use new _mesa_reference_texobj() function for referencing/unreferencing textures. Add new assertions/tests to try to detect invalid usage of deleted textures.
2007-08-13added some missing Default1D/2DArray texture codeBrian
2007-07-19fix mesa's handling of fbo's / window fb (again)Roland Scheidegger
Make sure the relevant fields in window fbs get updated at appropriate time (those are NOT the same as fbos!!!), and fix up related code accordingly. This is a bit ugly, but there's a reason the issues section in EXT_fbo is a couple hundred pages long... Hopefully correct now.
2007-07-19more fixes for mesa's fbo handling (fixes tests/fbotest1/2)Roland Scheidegger
2007-07-16fix bogus fb/drawable informationRoland Scheidegger
the framebuffer objects attached to drawables can have invalidate state associated with them, since for the window framebuffer this is per-context state and not per-fbo state. Since drivers rely on that information (otherwise would need to check if currently the window-framebuffer is bound in a lot of places) fix it up in _mesa_make_current (ugly). (Brought over from i915tex_privbuffers, where it fixes xdemos/wincopy when switching to front buffer rendering.)
2007-07-04Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian
of -I flags.
2007-06-11In generic_nop() call _mesa_warning() instead of _mesa_problem() since it's ↵Brian
an app issue, not a mesa bug.
2007-06-08disable depthBits test in check_compatible(), see bug 11161Brian
2007-05-16Initial implementation of MESA_texture_arrayIan Romanick
Shadow sampling from texture arrays is still not implemented. Everything else should be there, though.
2007-04-21Rename occlude.[ch] to queryobj.[ch]Brian
2007-04-18s/GL_SHADER_PROGRAM/GL_SHADER_PROGRAM_MESA/ (a Mesa-specific token)Brian
2007-04-16Use generic program limits instead of NV-specific ones to init program ↵Brian
constants. Previously, this limited us to 12 temp regs for vertex programs. Many vertex shaders could exceed that. This forces us to stop using t_vb_arbprogram.c for now because of its particular register indexing scheme. Need to increase bits allocated for register indexing, etc.
2007-04-14more _mesa_unreference_framebuffer() calls, remove dead codeBrian
2007-04-04Remove the never-used SI-style imports/exports code.Brian
2007-03-27Restore the UseTexEnvProgram logic.Brian
Was removed during glsl-compiler work. Still need to go back and revisit this because of the interaction with fragment shaders...
2007-03-24Free shader-related context state: _mesa_free_shader_state()Brian
2007-03-09Merge branch 'origin' into glsl-compiler-1Brian
Conflicts: src/mesa/main/context.c
2007-03-06Fix/improve framebuffer object reference counting.Brian
Use _mesa_reference_framebuffer() and _mesa_unreference_framebuffer() functions to be sure reference counting is done correctly. Additional assertions are done too. Note _mesa_dereference_framebuffer() renamed to "unreference" as that's more accurate.
2007-02-26Do proper framebuffer refcounting in _mesa_make_current().Brian
Also, added DeletePending field to gl_framebuffer used when a window has been deleted, but there still may be rendering contexts attached to the gl_framebuffer object.
2007-02-22Merge branch 'origin' into glsl-compiler-1Brian
Conflicts: src/mesa/main/state.c src/mesa/shader/program.c src/mesa/shader/program.h src/mesa/shader/programopt.c src/mesa/shader/slang/slang_execute.c src/mesa/sources src/mesa/swrast/s_arbshader.c src/mesa/swrast/s_context.c src/mesa/swrast/s_span.c src/mesa/swrast/s_zoom.c src/mesa/tnl/t_context.c src/mesa/tnl/t_save_api.c src/mesa/tnl/t_vb_arbprogram.c src/mesa/tnl/t_vp_build.c src/mesa/tnl/t_vtx_eval.c
2007-02-02Merge branch 'vbo-0.2'Keith Whitwell
Conflicts: src/mesa/main/texcompress_s3tc.c src/mesa/tnl/t_array_api.c
2007-01-26Override Const.CheckArrayBounds for Xserver in XMesaCreateContext().George Sapountzis
This leaves one last XFree86Server ifdef in Mesa core. --- Bug 9285: misc glcore, xmesa cleanups ACKed by Ian Romanick.
2007-01-26Drop old (pre-AIGLX) GLcore interface.George Sapountzis
The old GLcore interface was replaced in Xorg 7.1 with the addition of AIGLX, it is only used by DDX's which are known not to work with the new DIX glx code. --- Bug 9285: misc glcore, xmesa cleanups ACKed by Ian Romanick.
2007-01-16Merge branch 'master' of git+ssh://keithw@git.freedesktop.org/git/mesa/mesa ↵Keith Whitwell
into vbo-0.2 Conflicts: src/mesa/array_cache/sources src/mesa/drivers/dri/i965/brw_context.c src/mesa/drivers/dri/i965/brw_draw.c src/mesa/drivers/dri/i965/brw_fallback.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/i965/brw_vs_tnl.c src/mesa/drivers/dri/mach64/mach64_context.c src/mesa/main/extensions.c src/mesa/main/getstring.c src/mesa/tnl/sources src/mesa/tnl/t_save_api.c src/mesa/tnl/t_save_playback.c src/mesa/tnl/t_vtx_api.c src/mesa/tnl/t_vtx_exec.c src/mesa/vbo/vbo_attrib.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_api.c src/mesa/vbo/vbo_save_draw.c
2007-01-15Don't special-case FOG attribute initialization.Keith Whitwell
Initial fog value was being set to {0,0,0,0}. This results in vector size 4, but isn't necessary. The regular {0,0,0,1} works fine.
2006-12-20Minor clean-ups, reformatting, comment changes.Brian
2006-12-20Fix shader object reference counting and hash table deallocation.Brian
2006-12-19Clean-up and re-org of the main GLSL object types.Brian
Use the gl_shader struct as it should be. Renamed gl_linked_program to gl_shader_program. Store both shaders and programs in the same hash table and use the Type field to distinguish them.
2006-12-19Overhaul of GLSL API functions, dispatching, etc.Brian
2006-12-15Lots of assorted changes for new GLSL compiler backend.Brian
New datatypes, constants, variables.
2006-11-27replace check for XFree86LOADER and IN_MODULE with XFree86Server (bug 9144)Brian Paul
2006-11-18delete shader objects when destroying shared context stateBrian Paul