draw: Only run prepare when state, prim and opt changes
authorJakob Bornecrantz <wallbraker@gmail.com>
Mon, 24 Jan 2011 01:11:59 +0000 (02:11 +0100)
committerStéphane Marchesin <marcheu@chromium.org>
Thu, 26 Jan 2012 09:38:46 +0000 (01:38 -0800)
commitb6d3a435a0e0e53a9e8cc4c4249dc7c2f897a83d
tree8fc2f5bc0bb3f0213308adb2643f491fcdbf3247
parenteb65ccbc21670d16813b53e0f8d94cb4e037d39c
draw: Only run prepare when state, prim and opt changes

In bad applications like ipers which does a lot of draw calls with
no state changes this helps to greatly reduce time spent in prepare.
In ipers around 7% of CPU was spent in various prepare functions,
after this commit no prepare function show on the profile.

This commit also has the added benefit of now grouping all pipelined
drawing into a single draw call if the driver uses vbuf_render.

Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_pt.c
src/gallium/auxiliary/draw/draw_pt.h
src/gallium/auxiliary/draw/draw_pt_vsplit.c