From 7679a4ddf425f5a243ad8eb1baeda3caa508f829 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 30 Apr 2011 13:15:29 -0700 Subject: [PATCH] r300/compiler: Cleanups from the regalloc merge --- src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c | 2 +- src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c | 6 +----- src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c index ff022a51037..e2441e97d87 100644 --- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c +++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c @@ -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}, diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c index b94838e6c93..b0deb751be0 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c @@ -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; diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c index 828c7533a01..49983d6ce75 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c @@ -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; -- 2.11.0