aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_fbo.c
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: add support for ARB_texture_multisample (v3)Dave Airlie2013-04-111-1/+1
| | | | | | | | | | | | | | | | This adds support to the mesa state tracker for ARB_texture_multisample. hardware doesn't seem to use a different texture instructions, so I don't think we need to create one for TGSI at this time. Thanks to Marek for fixes to sample number picking. v2: idr pointed out a bug in how we picked the max sample counts, use new internal format chooser interface to pick proper answers. v3: use st_choose_format directly, it was okay, fix anding of masks. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: remove #include mfeatures.hBrian Paul2013-04-091-1/+0
| | | | | | None of these were needed. Reviewed-by: Jordan Justen <[email protected]>
* mesa: add helper func for checking combined depthstencil buffers from st/mesaMarek Olšák2013-03-231-24/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* st/mesa: add PIPE_FORMAT_R16G16B16A16_UNORM renderbuffer supportBrian Paul2013-03-121-0/+3
| | | | | | To allow rendering in 16-bit/channel RGBA buffers. Reviewed-by: José Fonseca <[email protected]>
* st/mesa: get rid of GET_CURRENT_CONTEXT in st_choose_formatMarek Olšák2013-02-061-4/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix InternalFormat for Z24X8 window-system buffersMarek Olšák2013-01-151-1/+3
| | | | | | This probably doesn't fix anything, but it's good to be consistent. Reviewed-by: Brian Paul <[email protected]>
* gallium: remove pipe_surface::usageMarek Olšák2012-12-121-2/+1
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add null pointer check in st_renderbuffer_delete()Brian Paul2012-12-031-4/+4
| | | | | | | In my testing I haven't found any cases where we get a null context pointer, but it might still be possible. Check for null just to be safe. Note: This is a candidate for the stable branches.
* st/mesa: fix context use-after-free problem in st_renderbuffer_delete()Brian Paul2012-11-301-3/+5
| | | | | | | | | | The use-after-free happened when the renderbuffer was shared by multiple contexts and we tried to delete the renderbuffer using a context which was previously deleted. Note: this is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: pass context parameter to gl_renderbuffer::Delete()Brian Paul2012-11-301-2/+2
| | | | | | | | | | 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]>
* st/mesa: add int cast to silence warningBrian Paul2012-11-061-1/+1
| | | | | | MSVC warns that negating an unsigned value yields an unsigned value. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-111-8/+7
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_EXT_framebuffer_object define.Oliver McFadden2012-09-151-2/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix-up and use _mesa_delete_renderbuffer()Brian Paul2012-08-311-1/+1
| | | | | | | | _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]>
* st/mesa: fix renderbuffer validation bugBrian Paul2012-08-101-0/+6
| | | | | | | | | | | | | | After we attach a new renderbuffer in this function we need to make sure Mesa's update_framebuffer() gets called. Fixes crash in WebGL conformance/textures/texture-attachment-formats.html, but the test still fails for other reasons. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53316 Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* st/mesa: set the correct window renderbuffer internal formatMarek Olšák2012-07-231-1/+9
| | | | | | The multisample-resolve blit relies on this being correct. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use DEBUG_INCOMPLETE_FBO debug flagBrian Paul2012-06-291-7/+3
|
* st/mesa: added some simple fbo debugging/helper codeBrian Paul2012-06-251-1/+25
|
* st/mesa: properly allocate MSAA renderbuffersMarek Olšák2012-06-161-3/+31
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: make unsupported renderbuffer formats always fail as FBO incompleteMarek Olšák2012-06-161-4/+10
| | | | | | | | | instead of failing to allocate a renderbuffer. This also fixes piglit/get-renderbuffer-internalformat with non-renderable formats. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: separate sw renderbuffer allocation from hw oneMarek Olšák2012-06-161-75/+93
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add floating point formats in st_new_renderbuffer_fb()Brian Paul2012-02-231-1/+8
| | | | | | To allow creating floating point buffers / pbuffers. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: assorted clean-ups in st_cb_fbo.cBrian Paul2012-02-151-19/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove st_framebuffer_renderbuffer()Brian Paul2012-02-151-14/+1
| | | | | | Just use _mesa_framebuffer_renderbuffer(). Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: don't set PIPE_BIND_DISPLAY_TARGET for user-created renderbuffersBrian Paul2012-02-151-0/+6
| | | | | | | | | | | The st_renderbuffer_alloc_storage() function is used to allocate both window-system buffers and user-created renderbuffers. The later kind are never directly displayed so don't set PIPE_BIND_DISPLAY_TARGET for those surfaces. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove redundant memset(surface_template,0)Brian Paul2012-02-151-1/+0
| | | | | | The subsequent u_surface_default_template() call does that for us. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove st_renderbuffer::strideBrian Paul2012-02-151-7/+6
| | | | | | It was only used for software buffers and easily computed. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: remove st_renderbuffer::formatBrian Paul2012-02-151-10/+3
| | | | | | We only used it in a few places that can implemented differently. Reviewed-by: Jose Fonseca <[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]>
* st/mesa: remove gl_renderbuffer::GetPointer stuffBrian Paul2012-01-241-19/+0
|
* st/mesa: remove gl_renderbuffer:DataType assignmentsBrian Paul2012-01-241-3/+0
| | | | | | | | That field is only used by swrast code so there's no reason to mess with it in the gallium state tracker. This also lets us remove the unused st_format_data() type function and related code.
* st/mesa: pass GL_MAP_INVALIDATE_RANGE_BIT to gallium driversBrian Paul2012-01-181-0/+2
| | | | | | when mapping renderbuffers or texture images. NOTE: This is a candidate for the 8.0 branch.
* mesa: rewrite accum buffer supportBrian Paul2011-12-081-0/+21
| | | | | | | | | | | | | Implemented in terms of renderbuffer mapping/unmapping and format packing/unpacking functions. The swrast and state tracker code for implementing accumulation are unused and will be removed in the next commit. v2: don't use memcpy() in _mesa_clear_accum_buffer() v3: don't allocate MAX_WIDTH arrays, be more careful with mapping flags Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: don't try to allocate zero-sized renderbuffersBrian Paul2011-11-281-0/+5
| | | | | | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43047 and https://bugs.freedesktop.org/show_bug.cgi?id=43048 Note: This is a candidate for the 7.11 branch. Tested-by: Vinson Lee <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* st/mesa: fix accum buffer allocation in st_renderbuffer_alloc_storage()Brian Paul2011-11-221-2/+12
| | | | | | | | | | | | | | | | | | If the gallium driver doesn't support PIPE_FORMAT_R16G16B16A16_SNORM the call to st_choose_renderbuffer_format() would fail and we'd generate an GL_OUT_OF_MEMORY error. We'd never get to the subsequent code that handles software/malloc-based renderbuffers. Add a special-case check for PIPE_FORMAT_R16G16B16A16_SNORM which is used for software-based accum buffers. This could be fixed in other ways but it would be a much larger patch. st_renderbuffer_alloc_storage() could be reorganized in the future. This fixes accum buffer allocation for the svga driver. Note: This is a candidate for the 7.11 branch. Reviewed-by: José Fonseca <[email protected]>
* st/mesa: check renderbuffer orientation in st_MapRenderbuffer()Brian Paul2011-11-151-5/+27
| | | | | | | We'll soon be able to use these for a core Mesa implementation of glReadPixels. Acked-by: Eric Anholt <[email protected]>
* st/mesa: first implementation of Map/UnmapRenderbuffer()Brian Paul2011-11-071-0/+59
| | | | Untested, but also unused at this point.
* gallium: rename ZS stencil type to UINT (v2)Dave Airlie2011-10-111-3/+3
| | | | | | | | | | these are never USCALED, always UINT in reality. taken from some work by Christoph Bumiller v2: fixup formatting of table + tabs Signed-off-by: Dave Airlie <[email protected]>
* gallium: Set renderbuffer's InternalFormat when rendering to textureSimon Farnsworth2011-09-291-0/+1
| | | | | | | | | | | | | | When an FBO is rendering to a texture (rather than a renderbuffer), Gallium sets up an internal renderbuffer to handle the rendering, and copies over enough texture state to make this work. InternalFormat was missed out, causing glTexCopyImage to take a slow path unnecessarily. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41263 Signed-off-by: Simon Farnsworth <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* st/mesa: Finalize texture on render-to-texture.Michel Dänzer2011-09-221-3/+6
| | | | | | | | | | | | This makes sure that stObj->pt exists and is up to date. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39193 and piglit fbo-incomplete-texture-03. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]> NOTE: This is a candidate for the 7.11 branch.
* st/mesa: Remove unused renderbuffer fields and functions.Stéphane Marchesin2011-09-071-15/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix renderbuffer internal format for accum bufferBrian Paul2011-06-061-1/+2
| | | | | Fixes an accum buffer regression since switching to the table-based format selection code.
* st/mesa: fix changing internal format via RenderbufferStorageMarek Olšák2011-05-301-5/+2
| | | | | | | | | | | | | | | | The problem is: The second time the function is called with a new internal format, strb->format is usually not PIPE_FORMAT_NONE. RenderbufferStorage(... GL_RGBA8 ...); RenderbufferStorage(... GL_RGBA16 ...); // had no effect on the format Broken with: fd6f2d6e5783d8810d0ab88e1c470958fd5eb2eb Test: piglit/fbo-storage-completeness NOTE: This is a candidate for the 7.10 branch. (if fd6f2d6e5783d8810d0ab88e1c470958fd5eb2eb is cherry-picked as well) Reviewed-by: Brian Paul <[email protected]>
* st/mesa: assign renderbuffer's format field when allocating storagepepp2011-05-211-0/+1
| | | | | | | | See http://bugs.freedesktop.org/show_bug.cgi?id=36173 NOTE: This is a candidate for the 7.10 branch. Signed-off-by: Brian Paul <[email protected]>
* mesa: added _mesa_get_attachment_teximage() helpersBrian Paul2011-04-051-3/+2
|
* gallium: add a CAP for mixed colorbuffer format supportMarek Olšák2011-04-011-1/+24
| | | | | Some GPUs can't do it (I think most of DX9 ones), so they should have the option not to allow it.
* gallium: remove the geom_flags param from is_format_supportedMarek Olšák2011-03-111-1/+1
|
* st/mesa: remove unnecessary flushesMarek Olšák2011-03-111-3/+0
| | | | | | | The framebuffer cache flush should be implicit when calling set_framebuffer_state. There is no need to flush the command stream either.
* st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format failsMarek Olšák2011-03-071-1/+5
| | | | | | This fixes: state_tracker/st_format.c:401:st_pipe_format_to_mesa_format: Assertion `0' failed.
* st/mesa: set renderbuffer _BaseFormat in a few placesBrian Paul2011-02-181-0/+2
| | | | NOTE: This is a candidate for the 7.9 and 7.10 branches