summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_drawpixels.c
AgeCommit message (Collapse)Author
2009-06-11mesa: Remove dead code.José Fonseca
2009-06-11mesa: Only do read write when we don't have a depth value to writeJakob Bornecrantz
2009-06-11mesa: Take the format from the right structure.José Fonseca
2009-06-11meas: Use a read/write transfer when writing stencil component, but not ↵José Fonseca
touching the depth component.
2009-06-10mesa: Fix draw_stencil_pixels for PIPE_FORMAT_Z24S8_UNORM.José Fonseca
Reversed component order. This fixes glean depthStencil test failures for PIPE_FORMAT_Z24S8_UNORM visuals.
2009-05-08mesa/st: keep surface_copy arguments positiveKeith Whitwell
The src/dest x,y, and w,h arguments of the pipe->surface_copy function are unsigned and the drivers aren't expecting negative (or extremly-large unsigned) values as inputs. Trim the requests at the state-tracker level before passing down.
2009-04-22gallium: Reinstate unconditional flushes.Thomas Hellstrom
Lost in commit e50dd26ca6d0eb0d0f97c2780020ea16e3d4a687. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-20gallium: Fix glDraw/CopyPixels fragment program leak.Michel Dänzer
2009-04-17gallium: Create OGL state tracker wrappers for various CPU access operations.Thomas Hellstrom
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>
2009-04-15gallium: Make sure we flush before some texture / buffer operations.Thomas Hellstrom
Also implement context member functions to optimize away those flushes whenever possible. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-09st: remove comp_byte parameter to st_texture_create()Brian Paul
We can determine if the texture is compressed by checking the format.
2009-04-07st: implement GL_DEPTH_STENCIL format for glReadPixels and DrawPixels()Brian Paul
2009-04-03mesa: ensure pbo stencil buffers are mapped before useAlan Hourihane
2009-03-27mesa: Support Z24S8 wherever S8Z24 is supported.José Fonseca
2009-03-13gallium: Remove do_flip argument from surface_copyJakob Bornecrantz
I should have gotten most uses and implementation correctly fixed, but things might break. Feel free to blame me.
2009-03-09st: remove unused DrawPixels codeBrian Paul
2009-03-04gallium: Unify reference counting.Michel Dänzer
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().
2009-02-28mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul
s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/ s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/ Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it. Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
2009-02-24gallium: Add pipe_buffer_write/read inlines.José Fonseca
Saves code, and will simplify future interface changes.
2009-02-16Merge branch 'master' into gallium-texture-transferKeith Whitwell
Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
2009-02-13gallium: Various coordinate fixups for texture transfers.Michel Dänzer
Fixes glReadPixels, gl(Copy)TexSubImage, glCopyPixels.
2009-02-12gallium: Fix GL_DEPTH CopyPixels tile coordinates.Michel Dänzer
2009-02-12mesa: consistantly use mesa memory-functions in gallium state trackerBrian Paul
Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc. Still using CALLOC_STRUCT() at this point.
2009-02-05gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer
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.
2008-12-12gallium: avoid mapping same vertex buffer in subsequent framesKeith Whitwell
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.
2008-10-10mesa: new _mesa_set_vp_override() function for driver-override of vertex programBrian Paul
Patch provide by Keith. Used in state tracker by DrawPixels to indicate that the state tracker (driver) is using its own vertex program. This prevents the texenvprogram code from replacing conventional shader inputs with state vars. Fixes glDraw/CopyPixels regressions.
2008-09-03gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.José Fonseca
We want to use the pipe_buffer_* inlines everywhere, but a pipe context is not always available nor is it needed.
2008-08-24gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul
Also, rename p_tile.[ch] to u_tile.[ch]
2008-08-18gallium: fix vertex program output translation/mapping bugBrian Paul
In some cases, the vertex program output's semantic info didn't match up with the fragment program's input semantic info. This info is now explicitly passed into the st_translate_fragment_program() function.
2008-07-19gallium: Finer grained is_format_supported.José Fonseca
2008-07-15st: Silence compiler warnings on Windows.Michal Krol
2008-07-13util: Eliminate pipe from the arguments to pipe_get/put_tile_xxx functions.José Fonseca
You don't need a pipe_context * for this, and all other necessary info is already inside pipe_surface.
2008-06-27gallium: Drop pipe_texture->cpp and pipe_surface->cpp.José Fonseca
The chars-per-pixel concept falls apart with compressed and yuv images, where more than one pixel are coded in a single data block.
2008-06-24mesa: More signed/unsigned float/integer fixes.José Fonseca
2008-06-24mesa: Use appropriate unsigned/signed, float/integer types.José Fonseca
2008-05-20Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul
2008-05-20gallium: clean-up glDraw/CopyPixels shaders when destroying contextBrian Paul
2008-05-18Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul
2008-05-17s/PIPE_FORMAT_U_S8/PIPE_FORMAT_S8_UNORM/Brian Paul
2008-05-08gallium: replace pipe_buffer_destroy() call with pipe_buffer_reference(NULL)Brian Paul
2008-05-08gallium: clean-up, minor fixBrian Paul
2008-05-06gallium: create drawing surfaces as GPU_READ/WRITE onlyBrian Paul
Create different temporary surfaces for CPU_READ/WRITE when needed (such as for glReadPixels, glAccum, some glCopy/DrawPixels, glCopyTexSubImage, etc).
2008-05-06gallium: Make sure to release texture surfaces (at the right time).Michel Dänzer
2008-05-02gallium: Add texture usage flags, special-case allocation of display targetsKeith Whitwell
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.
2008-05-01gallium: tex surface checkpointKeith Whitwell
2008-04-30gallium: use new buffer wrapper functions in p_inlines.hBrian Paul
This allows us to remove most of the direct references to winsys in the state tracker.
2008-04-28gallium: replace some code with a call to st_choose_format()Brian Paul
2008-04-25gallium: remove unneeded st->bitmap_texcoord_biasBrian Paul
2008-04-25gallium: fix typo s/_mesa_unmap_drapix_pbo/_mesa_unmap_drawpix_pbo/Brian Paul
2008-04-25gallium: consolidate quad drawing codeBrian Paul