diff options
author | Keith Whitwell <[email protected]> | 2008-04-06 14:29:30 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-04-06 14:31:41 +0100 |
commit | 5c19e47362c2d193850e98bd43a2bc2b783b0b5c (patch) | |
tree | 86dd3f231b1c79495d3c3a6ce6c851d03dae2550 /src/gallium/auxiliary/draw/draw_pt.h | |
parent | a8ca54955322b34c77a7459246e5639d3f8610cd (diff) |
draw: fix edgeflag handling on the pt paths
Encode edgeflags (and reset_stipple info) into the top two bits of the
fetch elements. This info could be moved elsewhere, but for now we
can live with a 1<<30 maximum element size...
Also use the primitive decomposition code from draw_prim.c verbatim, as
it includes all this stuff and is known to work.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt.h')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt.h b/src/gallium/auxiliary/draw/draw_pt.h index 800072c5115..590823fd330 100644 --- a/src/gallium/auxiliary/draw/draw_pt.h +++ b/src/gallium/auxiliary/draw/draw_pt.h @@ -40,6 +40,16 @@ typedef unsigned (*pt_elt_func)( const void *elts, unsigned idx ); struct draw_pt_middle_end; struct draw_context; +/* We use the top couple of bits in the vertex fetch index to convey a + * little API information. This limits the number of vertices we can + * address to only 1 billion -- if that becomes a problem, these could + * be moved out & passed separately. + */ +#define DRAW_PT_EDGEFLAG (1<<30) +#define DRAW_PT_RESET_STIPPLE (1<<31) +#define DRAW_PT_FLAG_MASK (3<<30) + + /* The "front end" - prepare sets of fetch, draw elements for the * middle end. * |