aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: make _mesa_scissor_bounding_box() staticSamuel Pitoiset2017-06-071-4/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* main/framebuffer: refactor _mesa_get_color_read_format/typeAlejandro Piñeiro2017-02-061-2/+6
| | | | | | | | | | | | | | | | | | Current implementation returns the value for the currently bound read framebuffer. GetNamedFramebufferParameteriv allows to get it for any given framebuffer. GetFramebufferParameteriv would be also interested on that method It was refactored by allowing to pass a given framebuffer. If NULL is passed, it used the currently bound framebuffer. It also adds a call to _mesa_update_state. When used only by GetIntegerv, this one was called as part of the extra checks defined at get_hash. But now that the method is used by more methods, and the update is needed, it makes sense (and it is safer) just calling it on the method itself, instead of rely on the caller. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: Add helper function _mesa_is_alpha_to_coverage_enabled()Anuj Phogat2016-11-071-0/+3
| | | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* mesa: Add helper function _mesa_is_alpha_test_enabled()Anuj Phogat2016-11-071-0/+3
| | | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* mesa: replace gl_context->Multisample._Enabled with ↵Bas Nieuwenhuizen2016-03-241-0/+3
| | | | | | | | | | | | _mesa_is_multisample_enabled. This removes any dependency on driver validation of the number of framebuffer samples. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Brian Paul <[email protected]>
* main: Use a derived value for the default sample countNeil Roberts2016-02-051-1/+2
| | | | | | | | | | | | | | | | | Previously the framebuffer default sample count was taken directly from the value given by the application. On the i965 driver on HSW if the value wasn't one that is supported by the hardware it would hit an assert when it tried to program the state for it. This patch fixes it by adding a derived sample count to the state for the default framebuffer. The driver can then quantize this to one of the valid values in its UpdateState handler when the _NEW_BUFFERS state changes. _mesa_geometric_samples is changed to use the new derived value. Fixes the piglit test arb_framebuffer_no_attachments-query Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93957 Cc: Ilia Mirkin <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: the _mesa_geometric_* functions require full types from mtypes.hIlia Mirkin2016-02-021-1/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/i965: Refactor brw_is_front_buffer_{drawing,reading} to common codeIan Romanick2015-10-061-0/+6
| | | | | | | | | | There are multiple similar implementations of these functions, and a later patch was going to add another. v2: Move removing intel_framebuffer to a different patch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa: helper function for scissor box of gl_framebufferKevin Rogovin2015-06-171-0/+3
| | | | | | | | | Add helper convenience function that intersects the scissor values against a passed bounding box. In addition, to avoid replicated code, make the function _mesa_scissor_bounding_box() use this new function. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kevin Rogovin <[email protected]>
* mesa: add helper functions for geometry of gl_framebufferKevin Rogovin2015-06-171-0/+28
| | | | | | | | | | Add convenience helper functions for fetching geometry of gl_framebuffer that return the geometry of the gl_framebuffer instead of the geometry of the buffers of the gl_framebuffer when then the gl_framebuffer has no attachments. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kevin Rogovin <[email protected]>
* main: Refactor _mesa_update_draw_buffer_bounds.Laura Ekstrand2015-05-141-1/+2
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_update_framebuffer.Laura Ekstrand2015-05-141-1/+3
| | | | | | | | | _mesa_update_framebuffer now operates on arbitrary read and draw framebuffers. This allows BlitNamedFramebuffer to update the state of its arbitrary read and draw framebuffers. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* mesa: Refactor bounding-box calculation out of _mesa_update_draw_buffer_boundsIan Romanick2014-01-201-0/+5
| | | | | | | | | | | | Drivers that currently use _Xmin and friends to set their scissor rectangle will need to use this code directly once they are updated for GL_ARB_viewport_array. v2: Use different bit-test idiom and fix mixed tabs and spaces. Both were suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove GL_MESA_resize_buffersIan Romanick2013-06-281-4/+0
| | | | | | | | | | | | Commit bab755a made the implementation a no-op, and it was only ever enabled by software rasterizers. v2: Move the spec into docs/specs/OLD since it's now obsolete (squashed patch from Andreas Boll) Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* mesa: add common format-independent memcpy-based ReadPixels pathMarek Olšák2013-03-231-1/+1
| | | | | | | | | | | I'll need the _mesa_readpixels_needs_slow_path function for the blit-based version, but it's also useful to have this memcpy-based path in one place and not scattered across several functions. v2: add "const" to function parameters Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* framebuffer: add _mesa_get_read_renderbufferJordan Justen2013-01-141-0/+5
| | | | | | | | | 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 _mesa_update_depth/stencil_buffer() staticBrian Paul2011-10-111-8/+0
| | | | | | | 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: s/INLINE/inline/Brian Paul2011-10-011-1/+1
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* mesa: use inline function wrapper for _mesa_reference_framebuffer()Brian Paul2011-07-141-1/+9
|
* mesa: Use the common logic for "is this baseformat a color format?"Eric Anholt2011-01-031-1/+2
| | | | | | 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: Clean up header file inclusion in framebuffer.h.Vinson Lee2010-11-091-1/+4
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-11/+11
|
* Rename GLvisual and __GLcontextModes to struct gl_configKristian Høgsberg2010-10-131-2/+2
|
* mesa: Add missing header to framebuffer.h.Vinson Lee2010-07-291-0/+1
| | | | Include mtypes.h for GLvisual and GLcontext symbols.
* mesa: added _mesa_print_framebuffer() for debuggingBrian Paul2010-04-291-0/+3
|
* mesa: Factor out the fb initialization details from _mesa_new_framebuffer.Francisco Jerez2010-02-031-1/+5
| | | | | | | | | | | 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/+5
| | | | | | | | | | | 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 last of _mesa_unreference_framebuffer() callsBrian Paul2009-03-071-3/+0
|
* mesa: refactor: move _mesa_resizebuffers(), _mesa_ResizeBuffersMESA() to ↵Brian Paul2008-09-211-0/+8
| | | | | | framebuffer.c (cherry picked from commit 9091015a9782ad15e58540a8fd61df83ea2bfe31)
* Fix/improve framebuffer object reference counting.Brian2007-03-061-1/+5
| | | | | | | 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.
* Added _mesa_dereference_framebuffer() to encapsulate reference countBrian Paul2006-05-201-1/+4
| | | | decrement, delete and locking.
* merge from texman branchmesa_20060325Brian Paul2006-03-261-0/+8
|
* added _mesa_source/dest_buffer_exists() function to easily test if ↵Brian Paul2006-03-201-1/+8
| | | | particular renderbuffers are present
* Move _mesa_add_soft_renderbuffers() from framebuffer.c to renderbuffer.cBrian Paul2005-09-131-10/+1
| | | | Update some comments, code, etc.
* Major check-in of changes for GL_EXT_framebuffer_object extension.Brian Paul2005-05-041-0/+67
Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.