aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_rect.h
Commit message (Collapse)AuthorAgeFilesLines
* gallium/util: fix returning empty box for rectangle intersectionRoland Scheidegger2015-09-011-1/+6
| | | | | | | | | These functions deal with inclusive coordinates, hence a 0/0/0/0 rect returned when there's no intersection doesn't actually represent an empty rectangle. Hence return 0/-1/0/-1 instead. This fixes some problems in llvmpipe with empty scissor rects (which up to now didn't really matter because while the intersect test returned the wrong result all pixels were scissored away later anyway).
* gallium/util: return FALSE for intersection if there's empty rectanglesRoland Scheidegger2015-09-011-1/+6
| | | | | | | | | | | | It isn't really obvious if intersection test should take into account empty rectangles or if the caller should do it. But it looks like most callers actually verified one of the rects but not the other, but since correctly returning an empty rect that other rect could actually be empty leading to more bugs. Hence just verify both rects for emptyness in the intersection test itself which makes the code easier in the caller (though it will be slower if the caller knows the rectangles are non-empty). Reviewed-by: Zack Rusin <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-5/+5
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* gallium/auxiliary: add contained and rect checks (v6)Christoph Bumiller2014-11-181-0/+18
| | | | | | | | | | | | | v3: thanks to Brian, improved coding style, also glennk helped spot few things (unsigned -> int, two constify) v4: thanks Ilia improved function, dropped u_box_clip_3d v5: incorporated rest of Gregor proposed changes,clean ups v6: u_box_clip_2d simplify proposed by Ilia Mirkin Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* gallium: include u_surface.h instead of u_rect.hBrian Paul2013-09-301-6/+0
| | | | | | | | u_rect.h was including u_surface.h just to avoid touching a bunch of other source files after some functions were moved from u_rect.h to u_surface.h. This patch cleans up that hack. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/util: Move the util_copy/fill_rect into u_surface.José Fonseca2012-12-061-28/+2
| | | | | | | | | | u_rect.h said these should move to a different file, and u_surface seems a better home. Leave #include "util/u_surface.h" to avoid having to touch thousand of files. Reviewed-by: Brian Paul <[email protected]>
* util/u_rect: Make it C++ safe.José Fonseca2012-11-091-0/+15
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: add rectangle helpers to u_rect.hKeith Whitwell2010-08-251-4/+53
| | | | | | This begins a process of repurposing this file. The existing usage is as a header file for some software blit fallbacks, which should be moved to a more appropriately named header.
* util: fix util_fill_rect to take util_color instead of u32 paramRoland Scheidegger2010-08-231-1/+2
| | | | | | | | util_fill_rect could not handle formats with more than 32 bits, since the fill color was a uint32_t value. Fix this by using a util_color union instead, and also expand the union so it works with formats which have up to 256 bits (the max of any format currently defined).
* gallium: move surface utility functions into u_surface.cBrian Paul2010-05-031-19/+0
| | | | This is a better place than in u_rect.c
* gallium/util: make src_y unsigned like the other x/y paramsBrian Paul2010-01-071-1/+1
|
* gallium: interface cleanups, remove nblocksx/y from pipe_texture and moreRoland Scheidegger2009-11-301-2/+2
| | | | | | | | 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-2/+2
|
* gallium: new util_surface_copy() and util_surface_fill() helpersBrian Paul2008-09-041-0/+18
| | | | | These are plug-in fallbacks for the pipe->surface_copy() and pipe->surface_fill() functions.
* gallium: move pipe_copy_rect(), pipe_fill_rect() protos into new u_rect.h headerBrian Paul2008-08-221-0/+54