summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Factor out the fb initialization details from _mesa_new_framebuffer.Francisco Jerez2010-02-031-12/+29
| | | | | | | | | | | This should make things easier for drivers wanting to work with a "subclass" of gl_framebuffer. The complementary "_mesa_initialize_framebuffer" function is now called "_mesa_initialize_window_framebuffer" for the sake of symmetry. Signed-off-by: Brian Paul <[email protected]>
* mesa: Move OES_read_format support from drivers into the core.Eric Anholt2009-12-091-0/+26
| | | | | | | | | | | The assertion is that the correct read type to be using is the native type of the underlying read renderbuffer. For some fallback paths, this may be worse than GL_RGBA/GL_UNSIGNED_BYTE for reads today, but it gets all drivers the expected GL_BGRA/GL_UNSIGNED_BYTE for ARGB8888 or GL_BGR//GL_UNSIGNED_SHORT_5_6_5_REV for rgb565 with no work. This fixes the intel (and other) DRI drivers to report read formats that should hit blit PBO readpixels paths.
* mesa: remove a bunch of gl_renderbuffer fieldsBrian Paul2009-10-081-30/+40
| | | | | | _ActualFormat is replaced by Format (MESA_FORMAT_x). ColorEncoding, ComponentType, RedBits, GreenBits, BlueBits, etc. are all replaced by MESA_FORMAT_x queries.
* mesa: update framebuffer status as needed in _mesa_source/dest_buffer_exists()Brian Paul2009-08-081-4/+8
|
* mesa: test DrawBuffer, not ReadBuffer in _mesa_dest_buffer_exists()Brian Paul2009-08-071-10/+12
| | | | Also, update comments.
* mesa: add missing _glthread_INIT_MUTEX in _mesa_new_framebuffer()Keith Whitwell2009-03-121-0/+1
|
* mesa: remove last of _mesa_unreference_framebuffer() callsBrian Paul2009-03-071-16/+0
|
* mesa: rework _mesa_reference_framebuffer() to look like ↵Brian Paul2009-02-091-21/+24
| | | | | | | _mesa_reference_renderbuffer() _mesa_unreference_framebuffer() is deprecated since _mesa_reference_framebuffer(ptr, NULL) can be used instead.
* mesa: move call to _mesa_update_framebuffer_visual()Brian Paul2009-01-271-1/+0
| | | | | | | 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
* mesa: avoid calling _mesa_test_framebuffer_completeness() more than neededBrian Paul2009-01-221-2/+4
| | | | | | 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.
* mesa: update Visual.samples field in _mesa_update_framebuffer_visual()Brian Paul2009-01-221-0/+1
|
* mesa: update update_framebuffer_size() for ARB_fbo and mixed renderbuffer sizesBrian Paul2009-01-221-17/+16
|
* mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca2008-09-231-1/+1
|
* mesa: refactor: move _mesa_resizebuffers(), _mesa_ResizeBuffersMESA() to ↵Brian Paul2008-09-211-0/+78
| | | | | | framebuffer.c (cherry picked from commit 9091015a9782ad15e58540a8fd61df83ea2bfe31)
* fix BUFFER_DEPTH/BUFFER_ACCUM mix-upBrian Paul2008-09-021-6/+6
|
* Fix some issues with glDrawBuffer(GL_NONE), bug 14198Brian2008-01-221-0/+3
| | | | | Set _ColorDrawBuffers[0] = NULL if no renderbuffers enabled. Check that _ColorDrawBuffers[0] is non-null before dereferencing in a few places.
* Replace gl_framebuffer's _ColorDrawBufferMask with _ColorDrawBufferIndexesBrian2008-01-061-32/+13
| | | | | | | 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.
* Simplify ctx->_NumColorDrawBuffers, _ColorDrawBuffers and fix bug 13835.Brian2008-01-061-26/+71
| | | | | | | | | | | 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...
* Rework the GL_READ_BUFFER, GL_DRAW_BUFFER state repairs that Roland ↵Brian2007-08-161-6/+20
| | | | | | | | | 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.
* update comments, etc related to Read/DrawBuffer stateBrian2007-08-161-18/+28
|
* Implement mutex/locking around texture object reference counting.Brian2007-08-131-9/+4
| | | | | | Use new _mesa_reference_texobj() function for referencing/unreferencing textures. Add new assertions/tests to try to detect invalid usage of deleted textures.
* fix mesa's handling of fbo's / window fb (again)Roland Scheidegger2007-07-191-2/+1
| | | | | | | | 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.
* fix up mesa's probably bogus framebuffer updates with different read/write fbsRoland Scheidegger2007-07-191-12/+26
| | | | | | Conflicts: src/mesa/main/framebuffer.c
* Minor clean-up of polygon offset logic. Properly compute _MRD field.Brian2007-07-111-1/+3
|
* Fix some renderbuffer reference counting issues. Also fixes a mem leak.Brian2007-03-251-44/+8
|
* Assorted fixes for dealing with zero-size frame/renderbuffers.Brian2007-03-161-2/+5
| | | | | | | | | | 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.
* unreference old framebuffer, if needed, in _mesa_reference_framebuffer()Brian2007-03-061-0/+7
|
* Fix/improve framebuffer object reference counting.Brian2007-03-061-14/+32
| | | | | | | 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.
* Take care of texObj reference in _mesa_free_framebuffer_data()Brian2007-03-061-6/+11
|
* assert that fb->RefCount==0 in _mesa_free_framebuffer_data()Brian2007-02-271-0/+1
|
* Do proper framebuffer refcounting in _mesa_make_current().Brian2007-02-261-16/+23
| | | | | | 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.
* Set _NEW_BUFFERS in _mesa_resize_framebuffer(). This makes sure the swrastBrian Paul2006-10-161-2/+7
| | | | | module updates its state (CLIP_BIT) upon resizes. The driver could do this instead, but doing it here is safer.
* init accum buffer fields in _mesa_update_framebuffer_visual()Brian Paul2006-09-111-1/+14
|
* Check for a valid contextAlan Hourihane2006-06-211-1/+2
|
* If DrawBuffer isn't set, return immediatelyAlan Hourihane2006-06-191-0/+3
|
* Added _mesa_dereference_framebuffer() to encapsulate reference countBrian Paul2006-05-201-13/+34
| | | | decrement, delete and locking.
* remove an assertionBrian Paul2006-05-191-2/+0
|
* some tentative code for _mesa_update_framebuffer_visual()Brian Paul2006-04-201-0/+7
|
* do additional checking for setting up depth/stencil wrappersBrian Paul2006-04-061-3/+7
|
* Silence minor compiler warnings (-Wextra).Brian Paul2006-04-051-0/+2
|
* comments regarding assertionsBrian Paul2006-03-301-0/+5
|
* merge from texman branchmesa_20060325Brian Paul2006-03-261-113/+187
|
* fix issue in _mesa_free_framebuffer_data()Brian Paul2006-03-251-1/+1
|
* added some missing formats in _mesa_source/dest_buffer_exists()Brian Paul2006-03-241-2/+16
|
* added _mesa_source/dest_buffer_exists() function to easily test if ↵Brian Paul2006-03-201-1/+122
| | | | particular renderbuffers are present
* additional comments about GL_DEPTH_STENCIL buffersBrian Paul2005-11-161-2/+9
|
* Support for combined depth/stencil renderbuffers (GL_EXT_packed_depth_stencil).Brian Paul2005-11-161-2/+103
| | | | | depthstencil.c provides wrappers for treating depth/stencil buffers either as regular depth or stencil renderbuffers.
* check for ctx==NULL, bug 4087Brian Paul2005-11-151-1/+2
|
* fix GLX server resize/crash when resizing windowsBrian Paul2005-10-211-0/+3
|
* Fix some issues with state updates and renderbuffers. Querying GL_RED_BITS,Brian Paul2005-10-081-15/+27
| | | | etc. after calling glRenderBufferStorageEXT gave undefined results.