aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_fbo.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Pure software accum buffer.José Fonseca2009-06-101-73/+74
| | | | | | | | | | The existing implementation was already implemented on software, but relied on the pipe driver to always support the R16G16B16A16_SNORM format. This patch eliminates that, without prejudice against a future hardware-only implementation. It also avoids some of the short <-> float conversions, and only does a read transfer of the color buffer on GL_RETURN if absolutely necessary.
* st: create renderbuffer's pipe_surface in st_render_texture()Brian Paul2009-05-011-1/+11
| | | | | | Previously we created the pipe_surface during framebuffer validation. But if we did a glCopyTex[Sub]Image() before anything else we wouldn't yet have the surface. This fixes that.
* st: rearrange some code to be a little more clearBrian Paul2009-04-091-9/+7
|
* gallium: remove unneeded compressed=0 assignmentBrian Paul2009-04-091-1/+0
|
* gallium: Remove some superfluous instances of #include "p_inlines.h".Michel Dänzer2009-03-041-1/+0
|
* gallium: Unify reference counting.Michel Dänzer2009-03-041-2/+1
| | | | | | | | | | | | | | The core reference counting code is centralized in p_refcnt.h. This has some consequences related to struct pipe_buffer: * The screen member of struct pipe_buffer must be initialized, or pipe_buffer_reference() will crash trying to destroy a buffer with reference count 0. u_simple_screen takes care of this, but I may have missed some of the drivers not using it. * Except for rare exceptions deep in winsys code, buffers must always be allocated via pipe_buffer_create() or via screen->*buffer_create() rather than via winsys->*buffer_create().
* gallium: remove old state tracker renderbuffer attachment assertionBrian Paul2009-03-031-2/+0
| | | | | Not needed since renderbuffers are ref-counted. Fixes progs/demos/shadowtex.
* gallium: add st_validate_framebuffer() driver functionBrian Paul2009-02-271-0/+20
| | | | | | Gallium only supports combined depth/stencil buffers, not separate ones. If the user tries to create create a FBO with separate depth/stencil renderbuffers mark the FBO as unsupported.
* Merge branch 'master' into gallium-texture-transferKeith Whitwell2009-02-161-5/+5
|\ | | | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
| * mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul2009-02-121-2/+2
| |
| * mesa: consistantly use mesa memory-functions in gallium state trackerBrian Paul2009-02-121-1/+1
| | | | | | | | | | Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc. Still using CALLOC_STRUCT() at this point.
| * mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul2009-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'origin/gallium-0.2' into gallium-master-merge Conflicts: Makefile docs/relnotes-7.4.html docs/relnotes.html src/mesa/drivers/dri/i965/brw_wm.h src/mesa/main/imports.c src/mesa/main/mtypes.h src/mesa/main/texcompress.c src/mesa/main/texenvprogram.c src/mesa/main/version.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_draw.c
* | gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer2009-02-051-4/+0
|/ | | | | | | | | | Instead, a new pipe_transfer object has to be created and mapped for transferring data between the CPU and a texture. This gives the driver more flexibility for textures in address spaces that aren't CPU accessible. This is a first pass; softpipe/xlib builds and runs glxgears, but it only shows a black window. Looks like something's off related to the Z buffer, so the depth test always fails.
* gallium: remove pipe_buffer from surfacesZack Rusin2009-02-021-1/+0
| | | | | | | this change disassociates, at least from the driver perspective, the surface from buffer. surfaces are technically now views on the textures so make it so by hiding the buffer in the internals of textures.
* gallium: make p_winsys internalZack Rusin2009-01-301-1/+1
| | | | | move it to pipe/internal/p_winsys_screen.h and start converting the state trackers to the screen usage
* mesa: tweak to formattingAlan Hourihane2009-01-151-2/+2
|
* mesa: small cleanupAlan Hourihane2009-01-151-6/+5
|
* mesa: handle some cases of 0x0 render targetsAlan Hourihane2009-01-141-3/+4
|
* gallium: avoid mapping same vertex buffer in subsequent framesKeith Whitwell2008-12-121-1/+1
| | | | | | | | | | | Quite a few util modules were maintaining a single vertex buffer over multiple frames, and potentially reusing it in subsequent frames. Unfortunately that would force us into syncrhonous rendering as the buffer manager would be forced to wait for the previous rendering to complete prior to allowing the map. This resolves that issue, but requires the state tracker to issue a few new flush() calls at the end of each frame.
* gallium: new assertion on surface->textureBrian Paul2008-09-171-0/+1
|
* gallium: replace assertion with conditionalBrian Paul2008-07-041-1/+2
|
* gallium: handle msaaRoland Scheidegger2008-06-271-1/+3
|
* gallium: Drop pipe_texture->cpp and pipe_surface->cpp.José Fonseca2008-06-271-3/+5
| | | | | The chars-per-pixel concept falls apart with compressed and yuv images, where more than one pixel are coded in a single data block.
* gallium: remove unused varsBrian Paul2008-06-191-3/+0
|
* gallium: free renderbuffer's old texture in st_renderbuffer_alloc_storage()Brian Paul2008-05-261-2/+3
|
* gallium: depth textures have usage depth_stencil instead of render_targetRoland Scheidegger2008-05-091-6/+0
|
* gallium: re-enable call to init_renderbuffer_bits(), remove dead codeBrian Paul2008-05-081-14/+1
|
* gallium: fix some render to texture bugsBrian Paul2008-05-071-6/+28
| | | | | | | | | | | | | | | Before, we were sometimes rendering into a stale texture because st_finalize_texture() would discard the old texture and create a new one. Moved st_update_framebuffer atom after texture validation so that we can create a new renderbuffer surface if the texture changes. Also, split texture validation into two parts: finalize_textures and update_textures. Do finalize_textures first to avoid getting into the situtation where we're doing a pipe->surface_copy() mid-way through state validation. Some debug code still in place, but disabled...
* gallium: create drawing surfaces as GPU_READ/WRITE onlyBrian Paul2008-05-061-11/+14
| | | | | Create different temporary surfaces for CPU_READ/WRITE when needed (such as for glReadPixels, glAccum, some glCopy/DrawPixels, glCopyTexSubImage, etc).
* gallium: create renderbuffer surface w/out CPU_READ/WRITE flagsMichal Danzer2008-05-061-2/+0
|
* gallium: set template.target = PIPE_TEXTURE_2DBrian Paul2008-05-021-0/+1
|
* gallium: identify depth-stencil texturesKeith Whitwell2008-05-021-2/+14
| | | | And don't use the display-target path to allocate them.
* gallium: Add texture usage flags, special-case allocation of display targetsKeith Whitwell2008-05-021-8/+15
| | | | | | | | | | | For many envirionments it's necessary to allocate display targets in a window-system friendly manner. Add facilities so that a driver can tell if a texture is likely to be used to generate a display surface and if use special allocation paths if necessary. Hook up softpipe to call into the winsys->surface_alloc_storage() routine in this case, though we probably want to change that interface slightly also.
* gallium: remove usage of winsys->surface_alloc_storage from state trackerKeith Whitwell2008-05-021-76/+62
| | | | | | | | | Allocate a texture containing storage instead. Also clean up ACCUM buffer allocation slightly -- drivers will need some changes to texture allocation logic to accomodate the concept of a texture that will only as image storage by the CPU, but it's cleaner than it was.
* gallium: tex surface checkpointKeith Whitwell2008-05-011-8/+19
|
* gallium: use new buffer wrapper functions in p_inlines.hBrian Paul2008-04-301-1/+1
| | | | This allows us to remove most of the direct references to winsys in the state tracker.
* gallium: added some assertions to st_render_texture() to check surface formatBrian Paul2008-04-291-0/+2
| | | | Make sure we can really render to the texture surface given its format.
* gallium: Tell the driver the texture is updated when we finish rendering to it.Michel Dänzer2008-04-251-0/+4
|
* gallium: Initial support for pixel formats with unused storage components.Michel Dänzer2008-04-241-0/+4
| | | | | Also clarify that RGB formats with no (used) alpha component are treated as having alpha = 1.0.
* gallium: accum buffer fixesBrian Paul2008-04-071-3/+26
| | | | | | | If the driver can't create a PIPE_FORMAT_R16G16B16A16_SNORM surface, create an accum surface using a shallower format and taller height. Since only the accum buffer code accesses the surface the actual format doesn't really matter, just that there's enough memory.
* gallium: clean-up in st_renderbuffer_alloc_storage()Brian Paul2008-04-071-11/+16
|
* gallium: Change pipe->flush() interface to optionally return a fence.Michel Dänzer2008-03-261-1/+1
| | | | | The cell driver still uses an internal CELL_FLUSH_WAIT flag, in the long run proper fencing should be implemented for it.
* gallium: remove pipe_context->texture_create/release/get_tex_surface()Brian2008-02-271-4/+5
| | | | These functions are now per-screen, not per-context.
* gallium: state tracker didn't always notify drivers of texobj data changesBrian2008-02-201-0/+1
| | | | | | | | Calling glTexSubImage() or glTexImage() to replace texture data didn't reliably cause pipe->set_sampler_texture() to get called so drivers didn't always get notified of new texture data. The st_texture_object->pt pointer doesn't always indicate changed data so added a dirtyData field.
* gallium: rename pipe_buffer_handle to pipe_buffer, rework pipebuffer/ codeKeith Whitwell2008-01-251-2/+2
| | | | | | | | | | | Provide an actual definition of the pipe_buffer struct, containing the parameters used to create the buffer, and its refcount. Shift refcounting buffers out of the winsys interface, similar to surfaces & textures. Rework pipebuffer/ to reflect the fact these changes, and also Michel's reworking of the buffer interface.
* Back-port miscellaneous fixes from internal branch (mostly portability fixes).José Fonseca2008-01-171-0/+2
| | | | | | These are changes that are in our internal branch, but somehow were skipped so far. It was done using visual comparison of the branches -- it is likely that changes are being carried on the wrong way
* Remove mapping fields from struct pipe_surface.Michel Dänzer2008-01-141-3/+0
| | | | It's now the responsibility of surface users to keep track of their mappings.
* gallium: make state tracker explictly ask for rendercache flushesKeith Whitwell2007-12-201-1/+1
|
* add missing code for PIPE_FORMAT_S8_UNORM renderbufferBrian2007-12-131-0/+4
|
* Re-org of st_create_framebuffer() and renderbuffer format selection.Brian2007-12-121-20/+39
| | | | | | | | st_create_framebuffer() now takes pipe_formats for the color, depth, stencil buffers. This avoids a round-about chain of calls to pipe->is_format_supported() for window renderbuffers (their format never changes). Renderbuffer format selection code in st_format.c is simpler now too.