diff options
author | Keith Whitwell <[email protected]> | 2008-05-29 13:08:15 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-05-29 13:08:15 +0100 |
commit | a233f65f9b79734498c120e8052aa8d6255586e4 (patch) | |
tree | 7f3c24a0a4217e51fcfdcbb9423aee4eb9f74855 /src/gallium | |
parent | 45eecb93920c5a33e71b3c152749273908cb62fd (diff) |
draw: better calculation of fetch_count
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_vcache.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_vcache.c b/src/gallium/auxiliary/draw/draw_pt_vcache.c index 64fab612718..957b8edec23 100644 --- a/src/gallium/auxiliary/draw/draw_pt_vcache.c +++ b/src/gallium/auxiliary/draw/draw_pt_vcache.c @@ -256,13 +256,19 @@ static void vcache_check_run( struct draw_pt_front_end *frontend, unsigned min_index = draw->pt.user.min_index; unsigned max_index = draw->pt.user.max_index; unsigned index_size = draw->pt.user.eltSize; - unsigned fetch_count = MAX2(max_index, max_index + 1 - min_index); + unsigned fetch_count = max_index + 1 - min_index; const ushort *transformed_elts; ushort *storage = NULL; - if (fetch_count >= FETCH_MAX || - fetch_count > draw_count) + + if (0) debug_printf("fetch_count %d draw_count %d\n", fetch_count, draw_count); + + if (max_index == 0xffffffff || + fetch_count >= FETCH_MAX || + fetch_count > draw_count) { + debug_printf("fail\n"); goto fail; + } if (min_index == 0 && |