summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2009-10-11 14:18:11 +0200
committerMarek Olšák <maraeo@gmail.com>2010-04-19 00:34:02 +0200
commit340e5e65dc1a7b82c8f910971c185bb4627204ea (patch)
tree85b12e6121dcb8107c25d11feda39512dfa3615d /src/mesa/drivers/dri/r300/compiler
parent4d7ed844313a4be64e9162369c935ce750cd9b06 (diff)
r300/compiler: enable branch emulation for R500 fragment programs
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index 1e1053483d..25bf373b6f 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
@@ -98,6 +98,15 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{
rewrite_depth_out(c);
+ debug_program_log(c, "before compilation");
+
+ /* XXX Ideally this should be done only for r3xx, but since
+ * we don't have branching support for r5xx, we use the emulation
+ * on all chipsets. */
+ rc_emulate_branches(&c->Base);
+
+ debug_program_log(c, "after emulate branches");
+
if (c->is_r500) {
struct radeon_program_transformation transformations[] = {
{ &r500_transform_IF, 0 },
@@ -107,6 +116,8 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
};
radeonLocalTransform(&c->Base, 4, transformations);
+ debug_program_log(c, "after native rewrite part 1");
+
c->Base.SwizzleCaps = &r500_swizzle_caps;
} else {
struct radeon_program_transformation transformations[] = {
@@ -115,9 +126,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
};
radeonLocalTransform(&c->Base, 2, transformations);
- debug_program_log(c, "before emulate branches");
-
- rc_emulate_branches(&c->Base);
+ debug_program_log(c, "after native rewrite part 1");
c->Base.SwizzleCaps = &r300_swizzle_caps;
}
@@ -135,7 +144,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
if (c->Base.Error)
return;
- debug_program_log(c, "after native rewrite");
+ debug_program_log(c, "after native rewrite part 2");
rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_use, c);
if (c->Base.Error)