aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/renderbuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: use simple mtx in core mesaTimothy Arceri2017-11-091-6/+6
| | | | | | | | | Results from x11perf -copywinwin10 on Eric's SKL: 4.33338% ± 0.905054% (n=40) Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Yogesh Marathe <[email protected]>
* mesa: Set new renderbuffers to RGBA4 on all GLES contexts.Eric Anholt2017-10-101-1/+1
| | | | | | | | | Before we were doing RGBA4 on GLES3 only, but as of GLES2 2.0.22 it should be RGBA4 as well. Fixes DEQP functional.state_query.rbo.renderbuffer_internal_format. Tested-by: Matt Turner <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: rename _mesa_add_renderbuffer* functionsTimothy Arceri2017-04-181-5/+6
| | | | | | | These names make it easier to understand what is going on in regards to references. Reviewed-by: Brian Paul <[email protected]>
* mesa: fix typo and add assert() to _mesa_attach_renderbuffer_without_ref()Timothy Arceri2017-04-111-1/+3
| | | | | This function should only be used with a "freshly created" renderbuffer so assert RefCount is 1.
* mesa: create _mesa_attach_renderbuffer_without_ref() helperTimothy Arceri2017-04-101-8/+35
| | | | | | | | | | | | | | | This will be used to take ownership of freashly created renderbuffers, avoiding the need to call the reference function which requires locking. V2: dereference any existing fb attachments and actually attach the new rb. v3: split out validation and attachment type/complete setting into a shared static function. Reviewed-by: Emil Velikov <[email protected]> Tested-by: Bartosz Tomczyk <[email protected]>
* mesa: tidy up renderbuffer RefCount initialisationTimothy Arceri2017-04-061-1/+1
| | | | | | | | | | | 42aaa548 changed the renderbuffer initialisation of RefCount from 1 to 0. This is inconsitent with how we use RefCount elsewhere. Also every driver implementation of NewRenderbuffer() calls _mesa_init_renderbuffer() so its safe to set it there. Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove debugging code from _mesa_reference_*.Matt Turner2015-09-251-2/+0
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-231-1/+1
| | | | Acked-by: Eric Anholt <[email protected]>
* mesa: move GET_CURRENT_CONTEXT() to top of _mesa_init_renderbuffer()Brian Paul2015-01-151-1/+2
| | | | | | To fix MSVC build. Reviewed-by: Matt Turner <[email protected]>
* mesa: Fix render buffer initial internal format in GLES 3Mike Mason2015-01-151-1/+18
| | | | | | | | | | Changes the initial internal format of a render buffer to GL_RGBA4 in GLES 3. This fixes a failure in the following DrawElements test: dEQP-GLES3.functional.state_query.rbo.renderbuffer_internal_format Reviewed-by: Chad Versace <[email protected]>
* mesa: switch to c11 mutex functionsBrian Paul2014-03-031-6/+6
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: free object labels when deletingTimothy Arceri2013-09-041-0/+1
| | | | | | Signed-off-by: Timothy Arceri <[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: add renderbuffer Depth fieldJordan Justen2013-05-011-0/+1
| | | | | | | | | | With glFramebufferTexture, a renderbuffer may support all layers of the texture, so we need the depth of the renderbuffer to check for consistency which is required for framebuffer completeness. Signed-off-by: Jordan Justen <[email protected]> Reviewed-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: remove warning message in _mesa_reference_renderbuffer_()Brian Paul2012-12-031-4/+1
| | | | | | | | | | | | We were warning when there was no current context and we're about to delete a renderbuffer, but that happens fairly often and isn't really a problem. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=57754 Note: This is a candidate for the stable branches. Tested-by: Ian Romanick <[email protected]>
* mesa: pass context parameter to gl_renderbuffer::Delete()Brian Paul2012-11-301-2/+6
| | | | | | | | | | We sometimes need a rendering context when deleting renderbuffers. Pass it explicitly instead of trying to grab a current context (which might be NULL). The next patch will make use of this. Note: this is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix-up and use _mesa_delete_renderbuffer()Brian Paul2012-08-311-1/+5
| | | | | | | | _mesa_delete_renderbuffer() should free the mutex (though that may be a no-op) and then free the renderbuffer object itself. Subclasses of gl_renderbuffer can use this function too. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove gl_renderbuffer::WrappedBrian Paul2012-01-241-5/+0
| | | | There's no such thing as renderbuffer wrappers anymore.
* mesa: move freeing of software renderbuffers into swrastBrian Paul2012-01-241-6/+1
|
* mesa: remove gl_renderbuffer::DataTypeBrian Paul2012-01-241-1/+0
|
* mesa: remove obsolete PutRow, etc assignmentsBrian Paul2012-01-241-17/+0
|
* mesa: use _mesa_is_user_fbo() and _mesa_is_winsys_fbo() functionsBrian Paul2012-01-121-1/+1
| | | | | | Rather than testing the fbo's name against zero. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove gl_renderbuffer::PutRowRGB()Brian Paul2011-12-241-1/+0
| | | | | | No longer used anywhere. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove gl_renderbufer::PutMonoRow() and PutMonoValues()Brian Paul2011-12-241-2/+0
| | | | | | | The former was only used for clearing buffers. The later wasn't used anywhere! Remove them and all implementations of those functions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify _mesa_remove_renderbuffer()Brian Paul2011-12-081-10/+2
|
* mesa: remove software-based renderbuffer code from core MesaBrian Paul2011-12-081-2010/+0
| | | | | | We're now using the functions that live in swrast. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make some renderbuffer functions staticBrian Paul2011-12-081-48/+48
| | | | | | | The functions to allocate software color, depth, accum, etc buffers aren't called from anywhere else. Reviewed-by: Eric Anholt <[email protected]>
* mesa: rename MESA_FORMAT_RG88 to MESA_FORMAT_GR88Brian Paul2011-12-021-2/+2
| | | | | To better reflect the component ordering and be consistent with other format names.
* mesa: remove support for software alpha buffersBrian Paul2011-11-151-367/+0
| | | | | | | | This was only used by the xlib driver to add an alpha channel to the front/window color buffer. This was no longer going to work well with the move to direct mapping of renderbuffers. Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix the selection of soft renderbuffer color formatsBrian Paul2011-11-071-7/+17
| | | | | | | | | | | | | | This fixes a regression from the recent glReadPixels changes found with the piglit hiz tests. Use either MESA_FORMAT_RGBA8888 or MESA_FORMAT_RGBA8888_REV for color buffers depending on endian-ness. Before, the gl_renderbuffer::Format field was MESA_FORMAT_RGBA8888 but the data was really stored as MESA_FORMAT_RGBA8888_REV when using a little endian machine. Getting this right matters now that we can access renderbuffer data without going through the span functions (namely glReadPixels() + MapRenderbuffer()).
* mesa: remove unneeded soft renderbuffer format-setting codeBrian Paul2011-11-071-16/+0
| | | | | | | | These vars will just get overwritten when we call _mesa_add_renderbuffer() anyway. We only need to set the InternalFormat field when we create the software renderbuffer. Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix inital value for new renderbufferYuanhan Liu2011-11-031-1/+1
| | | | | | | | | | | | | EXT_framebuffer_object bspec says: Get Value Type Get Command Initial Value ------------------------------- ------ ----------- ----------- RENDERBUFFER_INTERNAL_FORMAT_EXT Z+ GetRenderbufferParameterivEXT RGBA NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Add MapRenderbuffer implementations for software drivers.Eric Anholt2011-11-011-0/+27
| | | | | | | | | | Mesa core's is generic for things like osmesa. For swrast_dri.so, we have to do Y flipping. The front-buffer path isn't actually tested, though, because both before and after it fails with a BadMatch in XGetImage. Reviewed-by: Brian Paul <[email protected]>
* mesa: use inline function wrapper for _mesa_reference_renderbuffer()Brian Paul2011-07-141-8/+4
|
* mesa: initial ARB_depth_buffer_float supportMarek Olšák2011-07-101-0/+3
| | | | | | | Using GL_NONE as DataType of Z32_FLOAT_X24S8, not sure what I should put there. The spec says the type is n/a. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove unused function _mesa_new_depthstencil_renderbufferMarek Olšák2011-06-241-23/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: fix void pointer arithmetic warningBrian Paul2011-04-201-2/+2
|
* mesa: Add renderbuffer accessors for A, I, L, FLOAT32.Eric Anholt2011-04-201-0/+218
| | | | | | | Of these, intel will be using I and L initially, and A once we rewrite fragment shaders and the CC for rendering to it as R. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add renderbuffer accessors for MESA_FORMAT_R_FLOAT32, RG_FLOAT32.Eric Anholt2011-04-201-0/+92
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Add renderbuffer accessors for MESA_FORMAT_RGBA_FLOAT32.Eric Anholt2011-04-201-0/+27
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: fix void pointer arithmetic warningsBrian Paul2011-04-181-21/+18
| | | | And fix a couple logic errors in the put_*_generic() functions.
* mesa: Add renderbuffer accessors for R8/RG88/R16/RG1616.Eric Anholt2011-04-181-0/+310
| | | | | | | This will replace the current (broken by trying to use an enum in the preprocessor) spantmp2.h support I wrote for the intel driver. Reviewed-by: Brian Paul <[email protected]>
* mesa: Use _mesa_get_format_bytes to refactor out the RB get_row_*Eric Anholt2011-04-181-60/+10
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Use _mesa_get_format_bytes to refactor out the RB get_pointer_*Eric Anholt2011-04-181-66/+11
| | | | Reviewed-by: Brian Paul <[email protected]>
* intel: Use Mesa core's renderbuffer accessors for depth.Eric Anholt2011-04-181-0/+2
| | | | | | | | | | | Since we're using GTT mappings now (no manual detiling), there's really nothing special to accessing these buffers, other than needing the new RowStride field of gl_renderbuffer to accomodate padding. Reduces the driver size by 2.7kb, and improves glean depthStencil performance 3-10x (!) Reviewed-by: Brian Paul <[email protected]>
* mesa: Add a function to set up the default renderbuffer accessors.Eric Anholt2011-04-181-78/+102
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Add a gl_renderbuffer.RowStride field like textures have.Eric Anholt2011-04-181-53/+62
| | | | | | | | | This will allow some drivers to reuse the core renderbuffer.c get/put row functions in place of using the spantmp.h macros. Note that unlike textures, we use a signed integer here to allow for handling FBO orientation. Reviewed-by: Brian Paul <[email protected]>