summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* framebuffer: add _mesa_get_read_renderbufferJordan Justen2013-01-141-0/+21
| | | | | | | | | This returns the current read renderbuffer for the specified format type. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Make more consistent use of _mesa_is_{user,winsys}_fbo()Paul Berry2012-07-261-3/+3
| | | | | | | | | | A lot of code was still differentiating between between winsys and user fbos by testing the fbo's name against zero. This converts everything in core mesa, the state tracker, and src/mesa/program over to use _mesa_is_user_fbo() and _mesa_is_winsys_fbo(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* msaa: Compute visual samples/sampleBuffers from all buffers.Paul Berry2012-07-241-2/+7
| | | | | | | | | This patch ensures that Visual.samples and Visual.sampleBuffers are set correctly even in the case where there is no color buffer. Previously, these values would retain their default value of 0 in this circumstance, even if the depth or stencil buffer was multisampled. Reviewed-by: Chad Versace <[email protected]>
* mesa: remove ctx->Const.sRGBCapableMarek Olšák2012-01-251-1/+1
| | | | | | | It always had the same value as ctx->Extensions.EXT_framebuffer_sRGB. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: use _mesa_is_user_fbo() and _mesa_is_winsys_fbo() functionsBrian Paul2012-01-121-4/+4
| | | | | | Rather than testing the fbo's name against zero. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove obsolete comment on _mesa_dest_buffer_exists()Brian Paul2012-01-121-1/+0
|
* mesa: remove gl_framebuffer:_DepthBuffer, _StencilBuffer fieldsBrian Paul2012-01-061-6/+0
| | | | | | | | These were used by swrast to make a combined depth+stencil buffer look like separate depth and stencil buffers. But that's no longer needed after rewriting the depth/stencil code in swrast. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _DepthBuffer, _StencilBuffer resize codeBrian Paul2011-12-131-18/+0
| | | | | | This is handled in swrast now when we validate the framebuffer state. Reviewed-by: Eric Anholt <[email protected]>
* mesa: move depth/stencil buffer validation to swrastBrian Paul2011-12-131-3/+0
| | | | | | | | | Since gl_framebuffer::_DepthBuffer and _StencilBuffer are only used by swrast, do the validation of those fields in swrast too. The main/depthstencil.[ch] code is no longer used and will be removed next. Reviewed-by: Eric Anholt <[email protected]>
* mesa: move update_depth/stencil_buffer() functionsBrian Paul2011-12-131-76/+2
| | | | | | | | | These functions update the gl_framebuffer::_DepthBuffer and _StencilBuffer fields, possibly creating renderbuffer wrappers that make a shared depth+stencil accessible as depth-only or stencil only. This stuff is only used by swrast now and will be moved there next. Reviewed-by: Eric Anholt <[email protected]>
* mesa: add missing RG_INTEGER and some RED_INTEGER_EXT checks.Dave Airlie2011-12-101-0/+1
| | | | | | | | | | | This just adds the correct checks and asserts in the right places. This doesn't fix all the tests that I've sent to piglit, need to add int paths to go alongside the uint paths that don't go via float to fix it up properly. I'm not sure how much of that could be templated/shared will have a look once I write it the long way. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: check attachment Type field in renderbuffer_exists()Brian Paul2011-10-131-10/+4
| | | | | | Instead of the renderbuffer pointer. In the future, attaching a texture may not mean the renderbuffer pointer gets set too. Plus, remove some commented-out assertions.
* mesa: consolidate _mesa_source/dest_buffer_exists()Brian Paul2011-10-131-87/+43
| | | | | | v2: add a 'reading' parameter to distinguish between reading and writing to the renderbuffer (we don't want to check if _ColorReadBuffer is null when we're about to draw). Eric found this mistake.
* mesa: make _mesa_update_depth/stencil_buffer() staticBrian Paul2011-10-111-24/+10
| | | | | | | These functions were only called in framebuffer.c where they were defined. Remove the unneeded attIndex parameter too. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove GL_COLOR_INDEX from _mesa_{dest,source}_buffer_existsIan Romanick2011-09-061-2/+0
| | | | | | | Mesa hasn't supported color-index rendering for a long time. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: don't forget about sampleBuffers in framebuffer visual updateChristoph Bumiller2011-07-271-0/+1
| | | | | | | Otherwise multisample will never been enabled for multisample renderbuffers. Reviewed-by: Brian Paul <[email protected]>
* mesa: use inline function wrapper for _mesa_reference_framebuffer()Brian Paul2011-07-141-8/+4
|
* mesa: implement depth/stencil renderbuffer wrapper accessors for Z32F_X24S8Marek Olšák2011-07-101-2/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: finish up ARB_texture_floatMarek Olšák2011-04-151-1/+13
| | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <[email protected]> mesa: handle floating-point formats in _mesa_base_fbo_format mesa: add ARB/ATI_texture_float, remove MESAX_texture_float commit 123bb110852739dffadcc81ad80b005b1c4f586d Author: Luca Barbieri <[email protected]> Date: Wed Aug 25 01:35:42 2010 +0200 mesa: compute floatMode for FBOs and return it on RGBA_FLOAT_MODE
* mesa: added _mesa_get_attachment_teximage() helpersBrian Paul2011-04-051-2/+2
|
* mesa: fix up assertion in _mesa_source_buffer_existsMarek Olšák2011-03-141-0/+2
| | | | | | | | | | This was probably missed when implementing luminance and luminance alpha render targets. _mesa_get_format_bits checks for both GL_*_BITS and GL_TEXTURE_*_SIZE. This fixes: main/framebuffer.c:892: _mesa_source_buffer_exists: Assertion `....' failed.
* Revert "mesa: reduce calls to _mesa_test_framebuffer_completeness()"Brian Paul2011-03-021-1/+1
| | | | | | | This reverts commit 1f9a0a4e6e5566c36c781add5f1e62af3efdfb58. This caused trouble with Lightsmark w/ i965 driver and fbo/fbo-blit-d24s8 (see bug 34894). It's probably something simple but no time to debug now.
* mesa: remove some old do-nothing codeBrian Paul2011-02-281-3/+0
|
* mesa: reduce calls to _mesa_test_framebuffer_completeness()Brian Paul2011-02-281-1/+1
| | | | | when updating/validating framebuffer state. The _Status field is set to zero when we need to recompute _Status. Otherwise, it's up to date.
* mesa/965: add support for GL_EXT_framebuffer_sRGB (v2)Dave Airlie2011-02-051-0/+2
| | | | | | | | | | | | This adds i965 support for GL_EXT_framebuffer_sRGB, it introduces a new constant to say that the driver can support sRGB enabled FBOs since enabling the extension doesn't mean the driver can actually support sRGB. Also adds the suggested state flush in the core code suggested by Brian. fix the ARB_fbo color encoding. Signed-off-by: Dave Airlie <[email protected]>
* mesa: Use the common logic for "is this baseformat a color format?"Eric Anholt2011-01-031-4/+4
| | | | | | When figuring out whether a renderbuffer should be used to set the visual bits of an FBO, we were missing important baseformats like GL_RED, GL_RG, and GL_LUMINANCE.
* mesa: added cases for GL_EXT_texture_integer formatsBrian Paul2010-10-231-0/+20
|
* mesa: add GL_RG case to _mesa_source_buffer_exists()Brian Paul2010-10-211-0/+1
| | | | Fixes failure with glReadPixels(format=GL_RG)
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-15/+15
|
* Drop GLframebuffer typedef and just use struct gl_framebufferKristian Høgsberg2010-10-131-2/+2
|
* Rename GLvisual and __GLcontextModes to struct gl_configKristian Høgsberg2010-10-131-2/+2
|
* mesa: fix mixed-up function call nameBrian Paul2010-08-261-2/+2
|
* mesa: Identify packed depth/stencil buffers using the Format field.Nick Bowler2010-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | Intel sometimes uses packed depth/stencil buffers even when only a depth buffer or only a stencil buffer was requested. Common code currently uses the _BaseFormat field to determine whether a depth/stencil wrapper is necessary. But unless the user explicitly requested a packed depth/stencil buffer, the _BaseFormat field does not encode this information, and the required wrappers are not created. The problem was introduced by commit 45e76d2665b38b ("mesa: remove a bunch of gl_renderbuffer fields"), which killed off the _ActualFormat field upon which the decision to create a wrapper used to be made. This patch changes the logic to use the Format field instead, which is more like the old code. Fixes fdo bug 27590. Signed-off-by: Nick Bowler <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* intel: Implement EGL_KHR_surfaceless extensionKristian Høgsberg2010-07-281-1/+0
|
* mesa: fix assertion failure for GL_ALPHA FBOsMarek Olšák2010-06-231-0/+1
|
* mesa: Allow GL_ALPHA FBOs with ARB_framebuffer_object.Eric Anholt2010-06-101-1/+2
| | | | Drivers still reject them today, but cairo would like to use these.
* mesa: added _mesa_print_framebuffer() for debuggingBrian Paul2010-04-291-0/+41
|
* mesa: added new function commentsBrian Paul2010-03-101-0/+8
|
* mesa: Remove checks of Visual.rgbModeIan Romanick2010-03-031-6/+1
| | | | | | This must always be true now, so there is no reason to check it. Ever. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Add assert to check for null pointer dereference.Vinson Lee2010-02-211-2/+6
|
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-1/+1
|
* mesa: replace _mesa_bzero() with memset()Brian Paul2010-02-191-3/+3
|
* 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.