summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-01-06 00:31:55 +0100
committerMarek Olšák <[email protected]>2013-01-06 14:44:12 +0100
commit25b3c0a52cb0834d683b99e141305424ea5695b6 (patch)
tree691245a38f2fffaa750a285deb6d503574984871 /src/gallium/drivers/r300/compiler/r3xx_fragprog.c
parent2f358feda311570610729658cfc2897090c14327 (diff)
r300g/compiler: add shader emulation for the alpha_to_one state
Diffstat (limited to 'src/gallium/drivers/r300/compiler/r3xx_fragprog.c')
-rw-r--r--src/gallium/drivers/r300/compiler/r3xx_fragprog.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/compiler/r3xx_fragprog.c b/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
index 8ef2d24fc99..7c9a3521162 100644
--- a/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
+++ b/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
@@ -82,8 +82,14 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{
int is_r500 = c->Base.is_r500;
int opt = !c->Base.disable_optimizations;
+ int alpha2one = c->state.alpha_to_one;
/* Lists of instruction transformations. */
+ struct radeon_program_transformation force_alpha_to_one[] = {
+ { &rc_force_output_alpha_to_one, c },
+ { 0, 0 }
+ };
+
struct radeon_program_transformation rewrite_tex[] = {
{ &radeonTransformTEX, c },
{ 0, 0 }
@@ -117,6 +123,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{"unroll loops", 1, is_r500, rc_unroll_loops, NULL},
{"transform loops", 1, !is_r500, rc_transform_loops, NULL},
{"emulate branches", 1, !is_r500, rc_emulate_branches, NULL},
+ {"force alpha to one", 1, alpha2one, rc_local_transform, force_alpha_to_one},
{"transform TEX", 1, 1, rc_local_transform, rewrite_tex},
{"transform IF", 1, is_r500, rc_local_transform, rewrite_if},
{"native rewrite", 1, is_r500, rc_local_transform, native_rewrite_r500},