From 82d0602c1f8a1f83fba948c5f04f72e01f517681 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 15 Jun 2010 01:42:06 -0700 Subject: [PATCH] r300/compiler: Enable hardware IF statements for r500 cards. --- src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c | 7 ++++--- src/mesa/drivers/dri/r300/r300_reg.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c index 31f556a96af..147b0710dbc 100644 --- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c +++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c @@ -111,9 +111,10 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c) debug_program_log(c, "after transform loops"); - rc_emulate_branches(&c->Base); - - debug_program_log(c, "after emulate branches"); + if (!c->Base.is_r500){ + rc_emulate_branches(&c->Base); + debug_program_log(c, "after emulate branches"); + } if (c->Base.is_r500) { struct radeon_program_transformation transformations[] = { diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h index ac93563ed9e..f25264b6f2d 100644 --- a/src/mesa/drivers/dri/r300/r300_reg.h +++ b/src/mesa/drivers/dri/r300/r300_reg.h @@ -3066,8 +3066,8 @@ enum { # define R500_FC_B_OP0_NONE (0 << 24) # define R500_FC_B_OP0_DECR (1 << 24) # define R500_FC_B_OP0_INCR (2 << 24) -# define R500_FC_B_OP1_DECR (0 << 26) -# define R500_FC_B_OP1_NONE (1 << 26) +# define R500_FC_B_OP1_NONE (0 << 26) +# define R500_FC_B_OP1_DECR (1 << 26) # define R500_FC_B_OP1_INCR (2 << 26) # define R500_FC_IGNORE_UNCOVERED (1 << 28) #define R500_US_FC_INT_CONST_0 0x4c00 -- 2.30.2