BY: exoticorn DATE: 2002-Aug-02 00:04 SUBJECT: it doesn't cope well with this codethis is a vcl version of the first vu code that i optimized by hand. i wanted to see how well vcl does it, but it doesn't seem to be able to optimize the loop and after a while segfaults in frustration.
if anyone with more experience with vcl could give it a try and tell me whether it is a problem with my code or a problem with vcl, it would be very much appreciated.
.init_vf_all
.init_vi_all
.syntax new
.vu
--enter
--endenter
start:
lq.xy seed, 4(vi0)
rinit r, seed[x]
lq factors, 3(vi0)
iaddiu counter, vi0, 0
lq.x framecnt, 5(vi0)
loi 256.5
add.xzy colorscale, vf0, i
sub rndtemp, vf0, vf0
rnext.xyz pos, r
loop:
--LoopCS 8, 8
rnext.x rndtemp, r
rnext.y pos, r
mul.xyz color, colorscale, pos[z]
mul.x acc, pos, vf0[w]
msub.x pos, framecnt, pos[z]
ftoi15.x pos, pos
mtir ipos, pos[x]
mfir.x pos, ipos
itof15.x pos, pos
sub.y pos, pos, factors[z]
mul.xy pos, pos, factors
add.xy pos, pos, factors[w]
ftoi4.xyz pos, pos
ftoi0.xyz color, color
sq.xyz color, 1(vi0)
sq.xyz pos, 2(vi0)
xgkick vi0
mr32 rndtemp, rndtemp
move.xz pos, rndtemp
isubiu counter, counter, 1
ibne counter, vi0, loop
--cont
b start
|