gallium: first steps to treat edgeflags as regular vertex element

The idea here is to eliminate the set_edgeflags() call in pipe_context
by treating edgeflags as a regular vertex element.

Edgeflags provoke special treatment in hardware, which means we need to
label them in some way, in this case we'll be passing them through the
vertex shader and labelling the vertex shader output with a new TGSI
semantic (TGSI_SEMANTIC_EDGEFLAG).
This commit is contained in:
Keith Whitwell
2009-12-09 19:03:10 +01:00
committed by Roland Scheidegger
parent 59f6af51b8
commit a08e348a84
15 changed files with 111 additions and 131 deletions

View File

@@ -318,8 +318,10 @@ draw_arrays(struct draw_context *draw, unsigned prim,
boolean draw_pt_get_edgeflag( struct draw_context *draw,
unsigned idx )
{
if (draw->pt.user.edgeflag)
if (draw->pt.user.edgeflag) {
float *ef = draw->pt.verted_buffer[idx]
return (draw->pt.user.edgeflag[idx/32] & (1 << (idx%32))) != 0;
}
else
return 1;
}