stephan mantler More »

Home | Contact | Photography | Explot

Posted
29 November 2005 @ 1pm

Tags: , , , ,

Other Languages: Deutsch

More on the shader

I’ve just taken a look at the FX Shader Compiler’s output for the broken shader, and what changes when I comment a few lines so that it doesn’t crash my machine any more… and figured out what the problem is.

Here’s a fairly minimal shader that crashes my machine:
PixelShader = asm
{
ps_3_0
defi i0, 100,0,0,0
def c0, 0.01, 0.5, 0, 0
mov r0, c0.zzzz
rep i0
add r0.x, r0.x, c0.x
if_ge r0.x, c0.y
add r0.y, r0.y, c0.x
break
endif
endrep
mov oC0, r0
};

Und hier ist einer, der funktioniert:
And here is one that works:
PixelShader = asm
{
ps_3_0
defi i0, 100,0,0,0
def c0, 0.01, 0.5, 0, 0
mov r0, c0.zzzz
rep i0
add r0.x, r0.x, c0.x
if_ge r0.x, c0.y
add r0.y, r0.y, c0.x
endif
endrep
mov oC0, r0
};

So, break is broken (sic!) if used inside an if construct.


No comments yet.


No comments yet.

Leave a Comment

…33 System Crashes Later… CompuTrainer Hacking Continued