From 63432ecfce5415fbf07f1781ec77b5ea3efff599 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 13 Jul 2010 21:25:27 -0700 Subject: r300/compiler: Enable presubtract sources The r300 compiler can now emit instructions that select from the presubtract source. A peephole optimization has been added to convert instructions like: ADD Temp[0].x, none.1, -Temp[1].x into the INV (1 - src0) presubtract operation. --- src/gallium/drivers/r300/r300_fs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/drivers/r300/r300_fs.c') diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index b9f4d77dea7..b8dab88ef09 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -387,6 +387,7 @@ static void r300_translate_fragment_shader( compiler.Base.is_r500 = r300->screen->caps.is_r500; compiler.Base.disable_optimizations = DBG_ON(r300, DBG_NO_OPT); compiler.Base.has_half_swizzles = TRUE; + compiler.Base.has_presub = TRUE; compiler.Base.max_temp_regs = compiler.Base.is_r500 ? 128 : 32; compiler.Base.max_constants = compiler.Base.is_r500 ? 256 : 32; compiler.Base.max_alu_insts = compiler.Base.is_r500 ? 512 : 64; -- cgit v1.2.3