brw: Fix build after TGSI declaration interface changes.

This commit is contained in:
Michal Krol 2008-05-31 19:54:20 +02:00
parent 99b4655549
commit 0112211614
4 changed files with 11 additions and 17 deletions

View file

@ -169,9 +169,9 @@ static void upload_sf_prog( struct brw_context *brw )
case TGSI_TOKEN_TYPE_DECLARATION:
if (parse.FullToken.FullDeclaration.Declaration.File == TGSI_FILE_INPUT)
{
int first = parse.FullToken.FullDeclaration.u.DeclarationRange.First;
int last = parse.FullToken.FullDeclaration.u.DeclarationRange.Last;
int interp_mode = parse.FullToken.FullDeclaration.Interpolation.Interpolate;
int first = parse.FullToken.FullDeclaration.DeclarationRange.First;
int last = parse.FullToken.FullDeclaration.DeclarationRange.Last;
int interp_mode = parse.FullToken.FullDeclaration.Declaration.Interpolate;
//int semantic = parse.FullToken.FullDeclaration.Semantic.SemanticName;
//int semantic_index = parse.FullToken.FullDeclaration.Semantic.SemanticIndex;
@ -291,8 +291,8 @@ static void update_sf_linkage( struct brw_context *brw )
case TGSI_TOKEN_TYPE_DECLARATION:
if (parse.FullToken.FullDeclaration.Declaration.File == TGSI_FILE_INPUT)
{
int first = parse.FullToken.FullDeclaration.u.DeclarationRange.First;
int last = parse.FullToken.FullDeclaration.u.DeclarationRange.Last;
int first = parse.FullToken.FullDeclaration.DeclarationRange.First;
int last = parse.FullToken.FullDeclaration.DeclarationRange.Last;
for (i = first; i < last; i++) {
vp_semantic[i].semantic =

View file

@ -26,9 +26,7 @@ void brw_shader_info(const struct tgsi_token *tokens,
case TGSI_TOKEN_TYPE_DECLARATION:
{
const struct tgsi_full_declaration *decl = &parse.FullToken.FullDeclaration;
unsigned last = decl->u.DeclarationRange.Last;
assert( decl->Declaration.Declare == TGSI_DECLARE_RANGE );
unsigned last = decl->DeclarationRange.Last;
// Broken by crazy wpos init:
//assert( info->nr_regs[decl->Declaration.File] <= last);

View file

@ -988,10 +988,8 @@ post_vs_emit( struct brw_vs_compile *c, struct brw_instruction *end_inst )
static void process_declaration(const struct tgsi_full_declaration *decl,
struct brw_prog_info *info)
{
int first = decl->u.DeclarationRange.First;
int last = decl->u.DeclarationRange.Last;
assert (decl->Declaration.Declare != TGSI_DECLARE_MASK);
int first = decl->DeclarationRange.First;
int last = decl->DeclarationRange.Last;
switch(decl->Declaration.File) {
case TGSI_FILE_CONSTANT:

View file

@ -351,18 +351,16 @@ void brw_wm_emit_decls(struct brw_wm_compile *c)
case TGSI_TOKEN_TYPE_DECLARATION:
{
const struct tgsi_full_declaration *decl = &parse.FullToken.FullDeclaration;
unsigned first = decl->u.DeclarationRange.First;
unsigned last = decl->u.DeclarationRange.Last;
unsigned first = decl->DeclarationRange.First;
unsigned last = decl->DeclarationRange.Last;
unsigned mask = decl->Declaration.UsageMask; /* ? */
unsigned i;
if (decl->Declaration.File != TGSI_FILE_INPUT)
break;
assert(decl->Declaration.Interpolate);
for( i = first; i <= last; i++ ) {
switch (decl->Interpolation.Interpolate) {
switch (decl->Declaration.Interpolate) {
case TGSI_INTERPOLATE_CONSTANT:
emit_cinterp(c, i, mask);
break;