r300/compiler: Cleanups from the regalloc merge
authorTom Stellard <tstellar@gmail.com>
Sat, 30 Apr 2011 20:15:29 +0000 (13:15 -0700)
committerTom Stellard <tstellar@gmail.com>
Sat, 30 Apr 2011 20:15:29 +0000 (13:15 -0700)
src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c

index ff022a5103753fe4310fd0150613706c007d5eda..e2441e97d875ca9468ac4a53d4a8431f4a8721d4 100644 (file)
@@ -149,7 +149,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
                {"pair translate",              1, 1,           rc_pair_translate,              NULL},
                {"pair scheduling",             1, 1,           rc_pair_schedule,               NULL},
                {"dead sources",                1, 1,           rc_pair_remove_dead_sources, NULL},
-               {"register allocation",         1, 1,           rc_pair_regalloc,               opt},
+               {"register allocation",         1, 1,           rc_pair_regalloc,               &opt},
                {"final code validation",       0, 1,           rc_validate_final_shader,       NULL},
                {"machine code generation",     0, is_r500,     r500BuildFragmentProgramHwCode, NULL},
                {"machine code generation",     0, !is_r500,    r300BuildFragmentProgramHwCode, NULL},
index b94838e6c935703bed2b65c8183580a8bf2308e8..b0deb751be04f6ef3f04a65cbc2a87c82ef8c887 100644 (file)
@@ -151,7 +151,7 @@ static void pair_sub_for_all_args(
                        unsigned int presub_src_count;
                        struct rc_pair_instruction_source * src_array;
                        unsigned int j;
-//                     fprintf(stderr, "Presubtract reader\n");
+
                        if (src_type & RC_SOURCE_RGB) {
                                presub_type = fullinst->
                                        U.P.RGB.Src[RC_PAIR_PRESUB_SRC].Index;
@@ -166,9 +166,7 @@ static void pair_sub_for_all_args(
                        for(j = 0; j < presub_src_count; j++) {
                                cb(userdata, fullinst, &sub->Arg[i],
                                                                &src_array[j]);
-//                             fprintf(stderr, "Callback for presub %u type=%u\n", j, src_type);
                        }
-//                     fprintf(stderr, "Done presubtract reader\n");
                } else {
                        struct rc_pair_instruction_source * src =
                                rc_pair_get_src(&fullinst->U.P, &sub->Arg[i]);
@@ -570,8 +568,6 @@ static void get_readers_pair_read_callback(
                                0 /*Pair Instructions don't use RelAddr*/,
                                src->File, src->Index, arg->Swizzle);
 
-//     fprintf(stderr, "Shared mask = %u for [%u].%u writemask=%u abort=%u exit=%u\n",
-//                     shared_mask, src->Index, arg->Swizzle, d->AliveWriteMask,d->ReaderData->Abort, d->ReaderData->ExitOnAbort);
        if (shared_mask == RC_MASK_NONE)
                return;
 
index 828c7533a01861c46163ccb6daf80bb80575a9c9..49983d6ce75d58bb252a025f9c5349f3f5206b34 100644 (file)
@@ -672,7 +672,7 @@ void rc_pair_regalloc(struct radeon_compiler *cc, void *user)
        struct r300_fragment_program_compiler *c =
                                (struct r300_fragment_program_compiler*)cc;
        struct regalloc_state s;
-       int do_full_regalloc = (int)user;
+       int * do_full_regalloc = (int*)user;
 
        memset(&s, 0, sizeof(s));
        s.C = cc;
@@ -689,7 +689,7 @@ void rc_pair_regalloc(struct radeon_compiler *cc, void *user)
        rc_recompute_ips(s.C);
 
        c->AllocateHwInputs(c, &alloc_input_simple, &s);
-       if (do_full_regalloc) {
+       if (*do_full_regalloc) {
                do_advanced_regalloc(&s);
        } else {
                s.Simple = 1;