summaryrefslogtreecommitdiff
path: root/src/mesa/main/framebuffer.c
AgeCommit message (Collapse)Author
2009-03-12mesa: add missing _glthread_INIT_MUTEX in _mesa_new_framebuffer()Keith Whitwell
2009-03-07mesa: remove last of _mesa_unreference_framebuffer() callsBrian Paul
2009-02-09mesa: rework _mesa_reference_framebuffer() to look like ↵Brian Paul
_mesa_reference_renderbuffer() _mesa_unreference_framebuffer() is deprecated since _mesa_reference_framebuffer(ptr, NULL) can be used instead.
2009-01-27mesa: move call to _mesa_update_framebuffer_visual()Brian Paul
Update the visual info in the _mesa_test_framebuffer_completeness() function when we've determined the FBO to be "complete". Fixes regression seen in progs/demos/shadowtex.c
2009-01-22mesa: avoid calling _mesa_test_framebuffer_completeness() more than neededBrian Paul
When we change a FBO's attachments, set _Status=0. Before using an FBO, check if status != GL_FRAMEBUFFER_COMPLETE. Also, fix missing GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE status.
2009-01-22mesa: update Visual.samples field in _mesa_update_framebuffer_visual()Brian Paul
2009-01-22mesa: update update_framebuffer_size() for ARB_fbo and mixed renderbuffer sizesBrian Paul
2008-09-23mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca
2008-09-21mesa: refactor: move _mesa_resizebuffers(), _mesa_ResizeBuffersMESA() to ↵Brian Paul
framebuffer.c (cherry picked from commit 9091015a9782ad15e58540a8fd61df83ea2bfe31)
2008-09-02fix BUFFER_DEPTH/BUFFER_ACCUM mix-upBrian Paul
2008-01-22Fix some issues with glDrawBuffer(GL_NONE), bug 14198Brian
Set _ColorDrawBuffers[0] = NULL if no renderbuffers enabled. Check that _ColorDrawBuffers[0] is non-null before dereferencing in a few places.
2008-01-06Replace gl_framebuffer's _ColorDrawBufferMask with _ColorDrawBufferIndexesBrian
Each array element is now a BUFFER_x token rather than a BUFFER_BIT_x bitmask. The number of active color buffers is specified by _NumColorDrawBuffers. This builds on the previous DrawBuffer changes and will help with drivers implementing GL_ARB_draw_buffers.
2008-01-06Simplify ctx->_NumColorDrawBuffers, _ColorDrawBuffers and fix bug 13835.Brian
These fields are no longer indexed by shader output. Now, we just have a simple array of renderbuffer pointers. If the shader writes to gl_FragData[i], send those colors to the N _ColorDrawBuffers. Otherwise, replicate the single gl_FragColor (or the fixed-function color) to the N _ColorDrawBuffers. A few more changes and simplifications can follow from this...
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-16update comments, etc related to Read/DrawBuffer 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-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-19fix up mesa's probably bogus framebuffer updates with different read/write fbsRoland Scheidegger
Conflicts: src/mesa/main/framebuffer.c
2007-07-11Minor clean-up of polygon offset logic. Properly compute _MRD field.Brian
2007-03-25Fix some renderbuffer reference counting issues. Also fixes a mem leak.Brian
2007-03-16Assorted fixes for dealing with zero-size frame/renderbuffers.Brian
In xmesa_check_and_update_buffer_size() handle xmctx==NULL correctly: still call _mesa_resize_framebufer(). If we don't we can wind up in a situation where the framebuffer size is non-zero but an attached renderbuffer size is still initialized to zero. This inconsistancy can later cause problems. Check for zero-size renderbuffers in update_color_draw_buffers() and update_color_read_buffer(). See bug 7205.
2007-03-06unreference old framebuffer, if needed, in _mesa_reference_framebuffer()Brian
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-03-06Take care of texObj reference in _mesa_free_framebuffer_data()Brian
2007-02-27assert that fb->RefCount==0 in _mesa_free_framebuffer_data()Brian
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.
2006-10-16Set _NEW_BUFFERS in _mesa_resize_framebuffer(). This makes sure the swrastBrian Paul
module updates its state (CLIP_BIT) upon resizes. The driver could do this instead, but doing it here is safer.
2006-09-11init accum buffer fields in _mesa_update_framebuffer_visual()Brian Paul
2006-06-21Check for a valid contextAlan Hourihane
2006-06-19If DrawBuffer isn't set, return immediatelyAlan Hourihane
2006-05-20Added _mesa_dereference_framebuffer() to encapsulate reference countBrian Paul
decrement, delete and locking.
2006-05-19remove an assertionBrian Paul
2006-04-20some tentative code for _mesa_update_framebuffer_visual()Brian Paul
2006-04-06do additional checking for setting up depth/stencil wrappersBrian Paul
2006-04-05Silence minor compiler warnings (-Wextra).Brian Paul
2006-03-30comments regarding assertionsBrian Paul
2006-03-26merge from texman branchBrian Paul
2006-03-25fix issue in _mesa_free_framebuffer_data()Brian Paul
2006-03-24added some missing formats in _mesa_source/dest_buffer_exists()Brian Paul
2006-03-20added _mesa_source/dest_buffer_exists() function to easily test if ↵Brian Paul
particular renderbuffers are present
2005-11-16additional comments about GL_DEPTH_STENCIL buffersBrian Paul
2005-11-16Support for combined depth/stencil renderbuffers (GL_EXT_packed_depth_stencil).Brian Paul
depthstencil.c provides wrappers for treating depth/stencil buffers either as regular depth or stencil renderbuffers.
2005-11-15check for ctx==NULL, bug 4087Brian Paul
2005-10-21fix GLX server resize/crash when resizing windowsBrian Paul
2005-10-08Fix some issues with state updates and renderbuffers. Querying GL_RED_BITS,Brian Paul
etc. after calling glRenderBufferStorageEXT gave undefined results.
2005-10-04change initialization of renderbuffer DepthBitsBrian Paul
2005-10-03disable a warningBrian Paul
2005-09-28check for framebuffer completeness, code clean-upBrian Paul
2005-09-23remove printfBrian Paul
2005-09-23Replace gl_framebuffer's _ColorReadBufferMask with _ColorReadBufferIndex,Brian Paul
Streamline the _mesa_update_framebuffer() function a bit.