aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_readpixels.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: consolidate PBO map/unmap helpersBrian Paul2009-09-031-3/+3
| | | | | | | Instead of _mesa_map_readpix_pbo() use _mesa_map_pbo_source(). Instead of _mesa_map_drawpix_pbo() and _mesa_map_bitmap_pbo() use _mesa_map_pbo_dest().
* mesa: Reverse s8z24 into z24s8 as required by EXT_packed_depth_stencil.José Fonseca2009-06-101-2/+7
| | | | | | Actually, after spotting this problem, I realized this is unreachable code. However don't bother to enable this fast path now, given the normal path is working just fine.
* mesa: Single precision constants.José Fonseca2009-06-101-2/+2
|
* gallium: Reinstate unconditional flushes.Thomas Hellstrom2009-04-221-0/+2
| | | | | | Lost in commit e50dd26ca6d0eb0d0f97c2780020ea16e3d4a687. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
* gallium: Create OGL state tracker wrappers for various CPU access operations.Thomas Hellstrom2009-04-171-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are two usage types of buffer CPU accesses: One where we try to use the buffer contents for multiple draw commands in a batch. (batch := sequence of commands that are flushed together), like incrementally adding bitmaps to a bitmap texture that is reallocated on flush. And one where we assume we can safely overwrite the old buffer contexts, like glTexSubImage. In this case we need to make sure all old drawing commands referencing the buffer are flushed before we map the buffer. This is easily forgotten. Add wrappers for the most common of these operations. The first type is prefixed with "st_no_flush" and the second type is prefixed with "st_cond_flush", where "cond" indicates that we attmpt to only flush if there is indeed unflushed draw commands referencing the buffer. Prefixed functions are screen::get_tex_transfer pipe_buffer_write pipe_buffer_read pipe_buffer_map Please use the wrappers whenever possible. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
* gallium: Make sure we flush before some texture / buffer operations.Thomas Hellstrom2009-04-151-1/+9
| | | | | | | Also implement context member functions to optimize away those flushes whenever possible. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
* st: implement GL_DEPTH_STENCIL format for glReadPixels and DrawPixels()Brian Paul2009-04-071-14/+40
|
* mesa: Fix orientation adjustment for reading stencil pixels.José Fonseca2009-04-061-1/+1
| | | | Fixes conform spcorner.c & spclear.c failure.
* mesa: remove the noClamp parameter to _mesa_pack_rgba_span_float()Brian Paul2009-04-031-1/+1
| | | | | It was only set to GL_TRUE in one place where it isn't really needed (glGetTexImage(sRGB format)).
* mesa: add new signed rgba texture formatRoland Scheidegger2009-03-281-1/+1
| | | | | This is a (partial) backport of the signed texture format support in OGL 3.1. Since it wasn't promoted from an existing extension roll our own.
* mesa: Support Z24S8 wherever S8Z24 is supported.José Fonseca2009-03-271-0/+27
|
* gallium: Unify reference counting.Michel Dänzer2009-03-041-4/+4
| | | | | | | | | | | | | | 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: Various coordinate fixups for texture transfers.Michel Dänzer2009-02-131-4/+4
| | | | Fixes glReadPixels, gl(Copy)TexSubImage, glCopyPixels.
* gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer2009-02-051-45/+59
| | | | | | | | | | 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: avoid mapping same vertex buffer in subsequent framesKeith Whitwell2008-12-121-3/+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: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+1
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* gallium: implement a fast-path for glReadPixels for common casesBrian Paul2008-08-191-0/+126
|
* util: Eliminate pipe from the arguments to pipe_get/put_tile_xxx functions.José Fonseca2008-07-131-5/+5
| | | | | You don't need a pipe_context * for this, and all other necessary info is already inside pipe_surface.
* gallium: Drop pipe_texture->cpp and pipe_surface->cpp.José Fonseca2008-06-271-3/+3
| | | | | The chars-per-pixel concept falls apart with compressed and yuv images, where more than one pixel are coded in a single data block.
* mesa: Use appropriate unsigned/signed, float/integer types.José Fonseca2008-06-241-4/+5
|
* Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul2008-05-181-1/+1
|\
| * s/PIPE_FORMAT_U_S8/PIPE_FORMAT_S8_UNORM/Brian Paul2008-05-171-1/+1
| |
* | gallium: fix some render to texture bugsBrian Paul2008-05-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+23
| | | | | | | | | | Create different temporary surfaces for CPU_READ/WRITE when needed (such as for glReadPixels, glAccum, some glCopy/DrawPixels, glCopyTexSubImage, etc).
* | gallium: tex surface checkpointKeith Whitwell2008-05-011-2/+3
|/
* gallium: check for PIPE_FORMAT_X8Z24_UNORM formatBrian Paul2008-04-281-1/+2
|
* gallium: fix readback of z16 valuesBrian Paul2008-04-101-1/+1
|
* gallium: more elaborate tracking of front color buffer stateBrian Paul2008-04-091-2/+31
| | | | | | | This fixes the case where the app calls SwapBuffers then calls glReadPixels to read the front color buffer. We now keep track of when the front buffer is a _logically_ copy of the back buffer (after SwapBuffers) and read from the back color buffer instead of the front.
* gallium: include st_cb_bitmap.h to silence warningBrian Paul2008-04-031-0/+1
|
* gallium: call st_flush_bitmap_cache()Brian Paul2008-04-031-0/+2
|
* 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.
* Refactor PBO validate/map code.Brian2008-03-211-3/+1
| | | | | | We always need to do PBO validation, so do that in core Mesa before calling driv er routine. cherry-picked from Mesa/master.
* gallium: implement PBO operations for glDraw/ReadPixels and glBitmapBrian Paul2008-03-211-10/+9
| | | | | | At this time there are no optimizations for directly blitting between buffer objects and surfaces (always go through mappings). glean pbo test passes now
* Code reorganization: update build.José Fonseca2008-02-151-1/+1
| | | | | | | | | Update the Makefiles and includes for the new paths. Note that there hasn't been no separation of the Makefiles yet, and make is jumping all over the place. That will be taken care shortly. But for now, make should work. It was tested with linux and linux-dri. Linux-cell and linux-llvm might require some minor tweaks.
* gallium: fix/finish glReadPixels(GL_DEPTH_COMPONENT).Brian2008-02-121-21/+78
| | | | This fixes demos/reflect ('d' key) and tests/zreaddraw.c
* Remove pipe->get/put_tile_rgba.Michel Dänzer2008-01-141-1/+2
| | | | | | | pipe_get/put_tile_rgba() now use pipe->get/put_tile internally. Also simplify the <format>_get/put_tile_rgba() helper functions and clean up some inconsitencies in them.
* Remove mapping fields from struct pipe_surface.Michel Dänzer2008-01-141-4/+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
|
* Replace "duplicate" formatsBrian2007-12-071-2/+2
|
* Eliminate struct pipe_region.Michel Dänzer2007-12-071-7/+6
| | | | | Directly use struct pipe_buffer_handle for storage and struct pipe_surface for (un)mapping.
* Move dimensions from struct pipe_region to struct pipe_surface.Michel Dänzer2007-11-291-3/+3
|
* initial support for PIPE_FORMAT_Z24_S8Brian2007-11-201-0/+9
|
* Move the get/put_tile() functions to pipe_context.Brian2007-10-251-1/+1
| | | | The _rgba versions are temporary until the state tracker is updated.
* fix function nameBrian2007-10-181-1/+1
|
* make read_stencil_pixels() non-staticBrian2007-10-181-5/+5
|
* fix addressing error in read_stencil_pixels()Brian2007-10-171-2/+2
|
* GL_STENCIL_INDEX supportBrian2007-10-131-1/+77
|
* get_tile() of Z surfaces returns floats nowBrian2007-10-131-13/+1
|
* basic support for reading GL_DEPTH_COMPONENTBrian2007-10-031-3/+34
|
* Added st_fb_orientation() function to determine the up/down orientation of ↵Brian2007-08-131-4/+12
| | | | the framebuffer.