aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_rect.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium: interface cleanups, remove nblocksx/y from pipe_texture and moreRoland Scheidegger2009-11-301-30/+41
| | | | | | | | This patch removes nblocksx, nblocksy arrays from pipe_texture (can be recalculated if needed). Furthermore, pipe_format_block struct is gone completely (again, contains just derived state). nblocksx, nblocksy, block are also removed from pipe_transfer, together with the format enum (can be obtained from the texture associated with the transfer).
* gallium: rename copy/fill_rect utility functionsBrian Paul2009-08-191-4/+4
|
* gallium: Unify reference counting.Michel Dänzer2009-03-041-3/+3
| | | | | | | | | | | | | | 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: Fix a couple of potential NULL pointer dereferences.Michel Dänzer2009-02-121-4/+4
| | | | A lot more test programs work.
* gallium: No longer allow CPU mapping surfaces directly.Michel Dänzer2009-02-051-69/+41
| | | | | | | | | | 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: 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: actually flip the coordinatesZack Rusin2008-11-061-1/+2
|
* gallium: new util_surface_copy() and util_surface_fill() helpersBrian Paul2008-09-041-0/+178
| | | | | These are plug-in fallbacks for the pipe->surface_copy() and pipe->surface_fill() functions.
* gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+0
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* gallium: rename p_util.c to u_rect.c (it only contains rect copy/fill helpers)Brian Paul2008-08-221-0/+151