OSDN Git Service

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 c3b815a..96f8fb8 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 f4694a4..fb3da92 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 9020fcc..a1432fe 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 74ccfd4..bf1b4d9 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;