aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_bitmap.c
Commit message (Collapse)AuthorAgeFilesLines
* st: Wait to create bitmap transfer until neededJakob Bornecrantz2009-04-191-8/+30
|
* gallium: Create OGL state tracker wrappers for various CPU access operations.Thomas Hellstrom2009-04-171-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mesa: merge the prog_src_register::NegateBase and NegateAbs fieldsBrian Paul2009-04-141-1/+1
| | | | | | There's really no need for two negation fields. This came from the GL_NV_fragment_program extension. The new, unified Negate bitfield applies after the absolute value step.
* st: remove comp_byte parameter to st_texture_create()Brian Paul2009-04-091-3/+2
| | | | We can determine if the texture is compressed by checking the format.
* gallium: consolidate bypass_vs and bypass_clipping flagsKeith Whitwell2009-03-131-1/+0
| | | | | | | | | The draw module provides a similar interface to the driver which is retained as various bits of hardware may be able to take on incremental parts of the vertex pipeline. However, there's no need to advertise all this complexity to the state tracker. There are basically two modes now - normal and passthrough/screen-coords.
* gallium: no need to keep a copy of shader tokens in state trackerKeith Whitwell2009-03-131-3/+1
| | | | | | | | Any driver who needs a copy of the shader tokens must organize to do so itself. This has been the case for a long time, but there was still defensive code in the state tracker, which is now removed. Any bugs resulting from this need to be fixed in the offending driver...
* st: also check for a8 texture support in bitmap codeKeith Whitwell2009-03-091-0/+4
|
* mesa: Clear cache->trans after destroying the transfer.José Fonseca2009-03-041-0/+1
|
* gallium: Unify reference counting.Michel Dänzer2009-03-041-8/+8
| | | | | | | | | | | | | | 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().
* mesa/st: support l8 as well as i8 in bitmap codeKeith Whitwell2009-02-241-1/+13
| | | | | Also don't send the partial program fragment down to hardware -- the program will never be used in that form.
* gallium: Add pipe_buffer_write/read inlines.José Fonseca2009-02-241-11/+5
| | | | Saves code, and will simplify future interface changes.
* mesa: Free the util shaders with the gallium's FREE.José Fonseca2009-02-191-0/+1
|
* Merge branch 'master' into gallium-texture-transferKeith Whitwell2009-02-161-2/+2
|\ | | | | | | | | | | | | 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-1/+1
| |
| * 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.
* | gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer2009-02-051-26/+26
|/ | | | | | | | | | 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.
* Merge commit 'origin/gallium-0.1' into gallium-0.2Alan Hourihane2008-12-151-15/+45
|\ | | | | | | | | | | Conflicts: src/gallium/winsys/gdi/SConscript
| * gallium: avoid mapping same vertex buffer in subsequent framesKeith Whitwell2008-12-121-15/+45
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge commit 'origin/gallium-0.1' into gallium-0.2Alan Hourihane2008-11-281-6/+18
|\| | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_sse2.c
| * gallium: fix glBitmap color bugBrian Paul2008-11-261-6/+18
| | | | | | | | | | | | By time we get around to rendering the cached bitmap, the current color may have changed. Need to make sure we load the constant slot with the cached color.
* | softpipe: Don't call pipe_buffer_destroy directly.José Fonseca2008-11-031-1/+1
|/ | | | Use pipe_buffer_reference instead.
* gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.José Fonseca2008-09-031-4/+4
| | | | | We want to use the pipe_buffer_* inlines everywhere, but a pipe context is not always available nor is it needed.
* 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: Finer grained is_format_supported.José Fonseca2008-07-191-1/+2
|
* gallium: fix surface memleak in bitmap codeBrian Paul2008-07-031-0/+5
| | | | Found w/ tunnel2.c demo.
* gallium: Drop pipe_texture->cpp and pipe_surface->cpp.José Fonseca2008-06-271-2/+2
| | | | | 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: More signed/unsigned float/integer fixes.José Fonseca2008-06-241-8/+8
|
* gallium: need to flush bitmap cache when raster color changesBrian Paul2008-06-171-6/+14
|
* mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca2008-05-311-19/+19
|
* gallium: Always unreference bitmap cache texture before resetting the cache.Michel Dänzer2008-05-271-4/+6
| | | | Fixes assertion failure with tunnel2 demo.
* Merge branch 'gallium-0.1' into gallium-tex-surfacesBrian Paul2008-05-201-0/+4
|\
| * gallium: fix shader mem leakBrian Paul2008-05-201-0/+4
| |
| * gallium: remove dead codeBrian Paul2008-05-191-9/+0
| |
* | gallium: remove dead codeBrian Paul2008-05-191-9/+0
| |
* | gallium: fix glBitmap surface memleak in context tear-downBrian Paul2008-05-161-0/+5
| |
* | gallium: remove dead codeBrian Paul2008-05-081-9/+0
| |
* | gallium: no-op st_Bitmap() if width or height is zeroBrian Paul2008-05-081-0/+3
| |
* | gallium: Add texture usage flags, special-case allocation of display targetsKeith Whitwell2008-05-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | 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: tex surface checkpointKeith Whitwell2008-05-011-7/+16
|/
* gallium: use the newer PIPE_FORMAT_x_UNORM format namesBrian Paul2008-04-301-2/+2
|
* gallium: use new buffer wrapper functions in p_inlines.hBrian Paul2008-04-301-8/+5
| | | | This allows us to remove most of the direct references to winsys in the state tracker.
* gallium: consolidate the bitmap->texel conversion codeBrian Paul2008-04-301-96/+67
|
* gallium: create a new texture each time we init/flush the bitmap cacheBrian Paul2008-04-301-38/+42
|
* gallium: simplify texture format selectionBrian Paul2008-04-301-40/+17
|
* gallium: flush pipe before updating bitmap textureBrian Paul2008-04-291-1/+5
| | | | Fixes duplicated text bug in progs/tests/texwrap.c
* gallium: remove unneeded st->bitmap_texcoord_biasBrian Paul2008-04-251-5/+2
|
* gallium: disable the bitmap/texcoord biasBrian Paul2008-04-241-1/+1
| | | | Doesn't seem to be needed after fixing the float->int conversion problem.
* gallium: use cso_destroy_vertex/fragment_shader() functionsBrian Paul2008-04-241-1/+1
| | | | | Also, rearrange the st_destroy_context() code a bit to prevent some invalid/NULL ptr derefs during tear-down.
* gallium: fix some bitmap frag shader issuesBrian Paul2008-04-221-31/+54
| | | | | If texturing happens to be enabled when glBitmap() is called, need to be careful about choosing a sampler unit, etc.
* gallium: How about restoring shaders instead of saving them again...Michel Dänzer2008-04-221-2/+2
|