r300/compiler: Don't erase sources when converting RGB->Alpha
authorTom Stellard <tstellar@gmail.com>
Wed, 9 Feb 2011 09:43:29 +0000 (01:43 -0800)
committerTom Stellard <tstellar@gmail.com>
Sat, 12 Feb 2011 03:42:35 +0000 (19:42 -0800)
https://bugs.freedesktop.org/show_bug.cgi?id=34030

NOTE: This is a candidate for the 7.10 branch.

src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c

index dd26049dce969bdf65bd70edcc7839d016b901d4..8e10813ff069745cb1ed6c525690db83828b5acb 100644 (file)
@@ -544,18 +544,12 @@ static void rgb_to_alpha_remap (
 {
        int new_src_index;
        unsigned int i;
-       struct rc_pair_instruction_source * old_src =
-                                       rc_pair_get_src(&inst->U.P, arg);
-       if (!old_src) {
-               return;
-       }
 
        for (i = 0; i < 3; i++) {
                if (get_swz(arg->Swizzle, i) == old_swz) {
                        SET_SWZ(arg->Swizzle, i, RC_SWIZZLE_W);
                }
        }
-       memset(old_src, 0, sizeof(struct rc_pair_instruction_source));
        new_src_index = rc_pair_alloc_source(&inst->U.P, 0, 1,
                                                        old_file, new_index);
        /* This conversion is not possible, we must have made a mistake in