summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
* 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-047-32/+49
| | | | | | | | | | | | | | 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().
* util: set vbuf.max_index in draw_vertex_buffer()Keith Whitwell2009-02-271-0/+2
| | | | (cherry picked from commit 1350f2efba5eeceebe0e711db6152c29e9889ce7)
* gallium: Add support for BSD operating systems, tested with FreeBSDBenjamin Close2009-02-253-10/+10
| | | | | | | | | | BSD supports pipe in the same way as linux hence options which are safe for linux are also safe for BSD. Define PIPE_OS_BSD in include/pipe/p_config.h and adjust the defines to make use of it. Also define MAP_ANONYMOUS for BSD systems which use MAP_ANON Signed-off-by: Benjamin Close <[email protected]>
* util: Don't use 0-sized arrays.José Fonseca2009-02-241-0/+6
| | | | Not supported by MSVC.
* gallium: Add pipe_buffer_write/read inlines.José Fonseca2009-02-242-21/+6
| | | | Saves code, and will simplify future interface changes.
* Merge commit 'origin/gallium-0.1'José Fonseca2009-02-231-2/+24
|\ | | | | | | | | | | Conflicts: src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c src/gallium/auxiliary/util/u_tile.c
| * util: Use a checkboard pattern instead of asserting for unknown formats.José Fonseca2009-02-201-2/+24
| | | | | | | | Useful to replay traces which use DXTC textures...
| * util: Support PIPE_FORMAT_Z32_FLOAT in pipe_tile_raw_to_rgbaJosé Fonseca2009-02-191-0/+29
| |
| * gallium: Fix typeo in mipmap filter for GL_UNSIGNED_SHORT_1_5_5_5_REVBrian Paul2009-01-061-1/+1
| | | | | | | | This is copied from Ian's commit a330933bb75c38148668637cd22b90d75d39506f
* | util/debug: need to fflush(stderr) on windowsKeith Whitwell2009-02-201-0/+1
| | | | | | | | Hard to believe... but true.
* | util: Also output messages to stderr on windows.José Fonseca2009-02-201-0/+6
| | | | | | | | When there is a console attached, and no debugger attached.
* | util: Stack backtracing facilities.José Fonseca2009-02-204-0/+170
| | | | | | | | Not much useful until we have symbol lookup.
* | gallium: Improve makefiles for librariesJakob Bornecrantz2009-02-201-3/+0
| | | | | | | | | | | | | | | | The template makefile that most libraries in gallium included was based on dri and had a bunch unrelevant junk in it. Update it and improve the depending makefiles.
* | mesa: Free the util shaders with the gallium's FREE.José Fonseca2009-02-192-0/+11
| |
* | util: Use right include.José Fonseca2009-02-191-1/+1
| |
* | Merge branch 'gallium-texture-transfer'Michel Dänzer2009-02-185-236/+217
|\ \ | | | | | | | | | | | | Conflicts: src/gallium/drivers/softpipe/sp_tile_cache.c
| * \ Merge branch 'master' into gallium-texture-transferKeith Whitwell2009-02-162-12/+14
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
| * | | gallium: Fix a couple of potential NULL pointer dereferences.Michel Dänzer2009-02-121-4/+4
| | | | | | | | | | | | | | | | A lot more test programs work.
| * | | Cosmetic: Rename struct pipe_transfer pointers from 'ps' to 'pt'.Michel Dänzer2009-02-121-13/+13
| | | | | | | | | | | | | | | | Missed these for the initial gallium-texture-transfer commit.
| * | | gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer2009-02-055-229/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | util: Move p_debug.h into util module.José Fonseca2009-02-1817-18/+379
| | | | | | | | | | | | | | | | | | | | The debug functions depend on several util function for os abstractions, and these depend on debug functions, so a seperate module is not possible.
* | | | util: (Re)enable memory debugging for all windows platforms.José Fonseca2009-02-181-1/+1
| |/ / |/| |
* | | gallium: const-correctness for u_linear.c functionsBrian Paul2009-02-112-7/+8
| | |
* | | gallium: silence warnings about void ptr arithmeticBrian Paul2009-02-111-5/+6
|/ /
* | gallium: remove pipe_buffer from surfacesZack Rusin2009-02-021-18/+18
| | | | | | | | | | | | | | 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.
* | util: List new file in sconscript.José Fonseca2009-02-011-0/+1
| |
* | gallium: initialize simple screen in driversZack Rusin2009-01-311-1/+1
| |
* | gallium: add a convience wrapper for simple screensZack Rusin2009-01-303-1/+192
| | | | | | | | forwards screen calls to the winsys
* | gallium: make p_winsys internalZack Rusin2009-01-305-17/+14
| | | | | | | | | | move it to pipe/internal/p_winsys_screen.h and start converting the state trackers to the screen usage
* | Merge branch 'gallium-0.2' into gallium-winsys-privateJosé Fonseca2009-01-301-0/+4
|\ \
| * | util: Define ffs for MinGW.José Fonseca2009-01-301-0/+4
| | |
* | | gallium: give the screen priority when it comes to buffer allocationsZack Rusin2009-01-291-12/+13
|/ / | | | | | | | | | | allows the driver to overwrite buffer allocation, first step on the way to making winsys interface internal to the drivers. state trackers and the code above it will go through the screen
* | gallium: standardize api on the prefix "nr"Zack Rusin2009-01-272-3/+3
| |
* | gallium: standardize on stride instead of pitch in the interfaceZack Rusin2009-01-271-1/+1
| |
* | gallium: Remove the standalone surfaces.José Fonseca2009-01-201-38/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is mostly just a cosmetic change that cleans-up the interfaces, replacing pipe_winsys::surface_* calls by /** * Allocate storage for a display target surface. * * Often surfaces which are meant to be blitted to the front screen (i.e., * display targets) must be allocated with special characteristics, memory * pools, or obtained directly from the windowing system. * * This callback is invoked by the pipe_screenwhen creating a texture marked * with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET flag to get the underlying * buffer storage. */ struct pipe_buffer *(*surface_buffer_create)(struct pipe_winsys *ws, unsigned width, unsigned height, enum pipe_format format, unsigned usage, unsigned *stride); Most drivers were updated but not all were tested. Use the softpipe pipe driver and the xlib winsys changes as a reference when fixing other drivers.
* | util: add reduced prim helperKeith Whitwell2009-01-191-0/+16
| |
* | Merge commit 'origin/gallium-0.2' into gallium-xlib-reworkKeith Whitwell2009-01-191-1/+1
|\ \
| * | gallium: Disable memory debugging for Windows OGL.José Fonseca2009-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately both Mesa and Gallium use the same defines for memory allocation (MALLOC, FREE, etc), and worse, some times memory is allocated with one set and freed with the other set, causing the homegrown memory debugger to trip on itself. In the future mesa and gallium should use different names, but for now, memory debugging on Windows will have to be carried with different tools..
* | | debug: add noprefix version of debug_dump_enumKeith Whitwell2009-01-171-0/+26
|/ /
* | util: List new file in SConscript.José Fonseca2008-12-311-0/+1
| |
* | gallium: Initialize var before use.José Fonseca2008-12-301-1/+1
| |
* | Merge commit 'origin/gallium-0.1' into gallium-0.2José Fonseca2008-12-227-1/+477
|\| | | | | | | | | | | Conflicts: src/gallium/auxiliary/util/Makefile
| * gallium: const correctness.José Fonseca2008-12-224-18/+18
| |
| * gallium: Fix typo in define name.José Fonseca2008-12-201-1/+1
| |
| * gallium: Simple and efficient cache.José Fonseca2008-12-196-0/+476
| | | | | | | | | | | | | | Fixed size hash table. Collisions are handled by simply destroying the previous entry. It hasn't received much testing yet.
| * gallium: replace #elif with #elseBrian Paul2008-12-191-1/+1
| |
| * Gallium: fix for conform testRobert Ellison2008-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following construction in util_surface_copy() in gallium/auxiliary/util/u_rect.c, introduced in commit d177c9ddda2c452cf7d6696d89cf4458ef986f98, incorrectly inverts the Y coordinate in the last parameter to pipe_copy_rect(). /* If do_flip, invert src_y position and pass negative src stride */ pipe_copy_rect(dst_map, &dst->block, dst->stride, dst_x, dst_y, w, h, src_map, do_flip ? -(int) src->stride : src->stride, src_x, do_flip ? w - src_y : src_y); The intention is to start at the last Y coordinate line and move backwards, in the case of a flip; in that case, the correct calculation is "src_y + h - 1", not "w - src_y". This fixes a Gallium assertion failure in the conformance tests: u_rect.c:65:pipe_copy_rect: Assertion `src_y >= 0' failed. debug_get_bool_option: GALLIUM_ABORT_ON_ASSERT = TRUE Trace/breakpoint trap
| * gallium: Enable memory debugging on all windows platforms.José Fonseca2008-12-181-1/+1
| |
| * gallium: fix memory corruption in u_gen_mipmap.cBrian Paul2008-12-171-10/+9
| | | | | | | | | | | | | | | | | | Remove the old/initial vbuf allocation in util_create_gen_mipmap(). We were allocating a small vbuf at this point so get_next_slot() didn't have as large of buffer as it expected. So all but the first set_vertex_data() was writing out of bounds. Also added some comments.