diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-08-07 20:44:02 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-08-16 20:46:28 +0800 |
commit | 5a085c623faebf957be3fae2f82dc89ef6214585 (patch) | |
tree | e391dd2836d5e7c365ea5e116f5f887b3228aea9 /src/gallium/auxiliary/draw/draw_pt.c | |
parent | 5b6bf799e637e9020af3a4bebe514b53d7c38eca (diff) |
draw: Replace vcache by vsplit.
vcache decomposes primitives while vsplit splits primitives. Splitting
is generally easier to do and is faster. More importantly, vcache
depends on flatshade_first to decompose. The outputs may have incorrect
vertex order which is significant to GS.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index b6debbecf5..b80fc8f552 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -48,7 +48,7 @@ DEBUG_GET_ONCE_BOOL_OPTION(draw_use_llvm, "DRAW_USE_LLVM", TRUE) #endif /* Overall we split things into: - * - frontend -- prepare fetch_elts, draw_elts - eg vcache + * - frontend -- prepare fetch_elts, draw_elts - eg vsplit * - middle -- fetch, shade, cliptest, viewport * - pipeline -- the prim pipeline: clipping, wide lines, etc * - backend -- the vbuf_render provided by the driver. @@ -106,15 +106,7 @@ draw_pt_arrays(struct draw_context *draw, middle = draw->pt.middle.general; } - - /* Pick the right frontend - */ - if (draw->pt.user.elts || (opt & PT_PIPELINE)) { - frontend = draw->pt.front.vcache; - } - else { - frontend = draw->pt.front.vsplit; - } + frontend = draw->pt.front.vsplit; frontend->prepare( frontend, prim, middle, opt ); @@ -131,10 +123,6 @@ boolean draw_pt_init( struct draw_context *draw ) draw->pt.test_fse = debug_get_option_draw_fse(); draw->pt.no_fse = debug_get_option_draw_no_fse(); - draw->pt.front.vcache = draw_pt_vcache( draw ); - if (!draw->pt.front.vcache) - return FALSE; - draw->pt.front.vsplit = draw_pt_vsplit(draw); if (!draw->pt.front.vsplit) return FALSE; @@ -182,11 +170,6 @@ void draw_pt_destroy( struct draw_context *draw ) draw->pt.middle.fetch_shade_emit = NULL; } - if (draw->pt.front.vcache) { - draw->pt.front.vcache->destroy( draw->pt.front.vcache ); - draw->pt.front.vcache = NULL; - } - if (draw->pt.front.vsplit) { draw->pt.front.vsplit->destroy( draw->pt.front.vsplit ); draw->pt.front.vsplit = NULL; |