i965: clean up texture target switches
authorBrian Paul <brianp@vmware.com>
Wed, 26 Aug 2009 17:05:04 +0000 (11:05 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 26 Aug 2009 18:02:24 +0000 (12:02 -0600)
src/mesa/drivers/dri/i965/brw_wm_emit.c

index 5f29ca1cd497789342d98a2cd5bf9032101a448d..268f7965c002d1c3e2bca809c2fde8d8f855c876 100644 (file)
@@ -735,10 +735,14 @@ static void emit_tex( struct brw_wm_compile *c,
       emit = WRITEMASK_XY;
       nr = 2;
       break;
-   default:
+   case TEXTURE_3D_INDEX:
+   case TEXTURE_CUBE_INDEX:
       emit = WRITEMASK_XYZ;
       nr = 3;
       break;
+   default:
+      /* unexpected target */
+      abort();
    }
 
    if (inst->tex_shadow) {
@@ -810,11 +814,15 @@ static void emit_txb( struct brw_wm_compile *c,
       brw_MOV(p, brw_message_reg(4), arg[1]);
       brw_MOV(p, brw_message_reg(6), brw_imm_f(0));
       break;
-   default:
+   case TEXTURE_3D_INDEX:
+   case TEXTURE_CUBE_INDEX:
       brw_MOV(p, brw_message_reg(2), arg[0]);
       brw_MOV(p, brw_message_reg(4), arg[1]);
       brw_MOV(p, brw_message_reg(6), arg[2]);
       break;
+   default:
+      /* unexpected target */
+      abort();
    }
 
    brw_MOV(p, brw_message_reg(8), arg[3]);