From a08e348a84f57ed5e8bf5888f1ce13934d2ce8fa Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 9 Dec 2009 19:03:10 +0100 Subject: 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). --- src/gallium/include/pipe/p_context.h | 8 -------- src/gallium/include/pipe/p_shader_tokens.h | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src/gallium/include') diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index f896001eb1..11bcdc0a24 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -57,14 +57,6 @@ struct pipe_context { void (*destroy)( struct pipe_context * ); - - /* Possible interface for setting edgeflags. These aren't really - * vertex elements, so don't fit there. - */ - void (*set_edgeflags)( struct pipe_context *, - const unsigned *bitfield ); - - /** * VBO drawing (return false on fallbacks (temporary??)) */ diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index 588ca5e026..c051d4dae8 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -127,7 +127,8 @@ struct tgsi_declaration_range #define TGSI_SEMANTIC_GENERIC 5 #define TGSI_SEMANTIC_NORMAL 6 #define TGSI_SEMANTIC_FACE 7 -#define TGSI_SEMANTIC_COUNT 8 /**< number of semantic values */ +#define TGSI_SEMANTIC_EDGEFLAG 8 +#define TGSI_SEMANTIC_COUNT 9 /**< number of semantic values */ struct tgsi_declaration_semantic { -- cgit v1.2.3