aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2010-08-03 15:23:23 -0700
committerTom Stellard <[email protected]>2010-08-03 19:11:08 -0700
commit2824d5687a19e42ba0da8fd08e80610c4469a3b3 (patch)
tree62c397d260f054fc1fd502c796963b7ecbc78605 /src/gallium
parent9dcc5006660037665fe98bf2d9fb966e620a038b (diff)
r300/compiler: r500 hw support for break and continue in loops.
The BGNLOOP and ENDLOOP instructions are now being used correctly, which makes break and continue possible. The deadcode pass has been modified to handle breaks, and the compiler is more careful about which loops are unrolled.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_fs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c
index db5269912e2..87ff49a90c7 100644
--- a/src/gallium/drivers/r300/r300_fs.c
+++ b/src/gallium/drivers/r300/r300_fs.c
@@ -248,13 +248,18 @@ static void r300_emit_fs_code_to_buffer(
shader->cb_code_size = 19 +
((code->inst_end + 1) * 6) +
- imm_count * 7;
+ imm_count * 7 +
+ code->int_constant_count * 2;
NEW_CB(shader->cb_code, shader->cb_code_size);
OUT_CB_REG(R500_US_CONFIG, R500_ZERO_TIMES_ANYTHING_EQUALS_ZERO);
OUT_CB_REG(R500_US_PIXSIZE, code->max_temp_idx);
OUT_CB_REG(R500_US_FC_CTRL, code->us_fc_ctrl);
- OUT_CB_REG(R500_US_CODE_RANGE,
+ for(i = 0; i < code->int_constant_count; i++){
+ OUT_CB_REG(R500_US_FC_INT_CONST_0 + (i * 4),
+ code->int_constants[i]);
+ }
+ OUT_CB_REG(R500_US_CODE_RANGE,
R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(code->inst_end));
OUT_CB_REG(R500_US_CODE_OFFSET, 0);
OUT_CB_REG(R500_US_CODE_ADDR,