gallium: remove the swizzling parts of ExtSwizzle
[mesa.git] / src / gallium / drivers / cell / ppu / cell_gen_fp.c
index b6b2f885af5fa81a2d341ba690a2fb31697af3e0..19e3ab0844030b3c39e101443fe3982ced8157ed 100644 (file)
@@ -231,7 +231,7 @@ static boolean
 is_register_src(struct codegen *gen, int channel,
                 const struct tgsi_full_src_register *src)
 {
-   int swizzle = tgsi_util_get_full_src_register_extswizzle(src, channel);
+   int swizzle = tgsi_util_get_full_src_register_swizzle(src, channel);
    int sign_op = tgsi_util_get_full_src_register_sign_mode(src, channel);
 
    if (swizzle > TGSI_SWIZZLE_W || sign_op != TGSI_UTIL_SIGN_KEEP) {
@@ -271,23 +271,14 @@ get_src_reg(struct codegen *gen,
             const struct tgsi_full_src_register *src)
 {
    int reg = -1;
-   int swizzle = tgsi_util_get_full_src_register_extswizzle(src, channel);
+   int swizzle = tgsi_util_get_full_src_register_swizzle(src, channel);
    boolean reg_is_itemp = FALSE;
    uint sign_op;
 
    assert(swizzle >= TGSI_SWIZZLE_X);
-   assert(swizzle <= TGSI_EXTSWIZZLE_ONE);
+   assert(swizzle <= TGSI_SWIZZLE_W);
 
-   if (swizzle == TGSI_EXTSWIZZLE_ONE) {
-      /* Load const one float and early out */
-      reg = get_const_one_reg(gen);
-   }
-   else if (swizzle == TGSI_EXTSWIZZLE_ZERO) {
-      /* Load const zero float and early out */
-      reg = get_itemp(gen);
-      spe_xor(gen->f, reg, reg, reg);
-   }
-   else {
+   {
       int index = src->SrcRegister.Index;
 
       assert(swizzle < 4);
@@ -1758,7 +1749,6 @@ emit_instruction(struct codegen *gen,
    case TGSI_OPCODE_ARL:
       return emit_ARL(gen, inst);
    case TGSI_OPCODE_MOV:
-   case TGSI_OPCODE_SWZ:
       return emit_MOV(gen, inst);
    case TGSI_OPCODE_ADD:
    case TGSI_OPCODE_SUB: