diff options
author | Chia-I Wu <[email protected]> | 2010-08-07 14:37:26 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-08-16 20:46:28 +0800 |
commit | 56213a64fe9e4270fd7886675b1e8224b2d88794 (patch) | |
tree | faaa7543cb426e1f82de115674ff03e86c41c494 /src/gallium/auxiliary/draw/draw_pt_util.c | |
parent | 9d2be38fad109d9a10942fddde0b9dc3824c329c (diff) |
draw: Add new util function draw_pt_trim_count.
draw_pt_trim_count is renamed from trim in draw_pt.c.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_util.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_util.c b/src/gallium/auxiliary/draw/draw_pt_util.c index 182a597cca2..513bbbed216 100644 --- a/src/gallium/auxiliary/draw/draw_pt_util.c +++ b/src/gallium/auxiliary/draw/draw_pt_util.c @@ -92,3 +92,10 @@ void draw_pt_split_prim(unsigned prim, unsigned *first, unsigned *incr) break; } } + +unsigned draw_pt_trim_count(unsigned count, unsigned first, unsigned incr) +{ + if (count < first) + return 0; + return count - (count - first) % incr; +} |