brw: Fix build after TGSI declaration interface changes.
authorMichal Krol <michal@tungstengraphics.com>
Sat, 31 May 2008 17:54:20 +0000 (19:54 +0200)
committerMichal Krol <michal@tungstengraphics.com>
Sat, 31 May 2008 17:54:20 +0000 (19:54 +0200)
src/gallium/drivers/i965simple/brw_sf.c
src/gallium/drivers/i965simple/brw_shader_info.c
src/gallium/drivers/i965simple/brw_vs_emit.c
src/gallium/drivers/i965simple/brw_wm_decl.c

index c3b815a82be2be6eb35792f5bf43915fbcf4aa7b..96f8fb87a3d493c8e5c9fbefb8bb4b5ab7f1861f 100644 (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 = 
index f4694a4433b212cfb91b39c3ac338d8988c02cc7..fb3da92421e485fb54132ba02d5e112adf580f67 100644 (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);
index 9020fcc001244aab40871c86886762d086546f34..a1432fece13da1c9fb2bbf4f58f8ea033d160c6d 100644 (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: 
index 74ccfd494a4abc9d10a755b3585fda96494de62f..bf1b4d961a734f7d27e9144f92da1fc3bb40a746 100644 (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;