Hi there !
I encounter some problems with these instructions. GPU is RADEON
8500/8500LE (drv 22.214.171.12418)
Here is the context :
For the test I use a simple VS and PS, as follows :
// Transform position
mov oD0,c22 ; c22 = 1.0f, 0.0f, 0.0f, 1.0f - RED
mov oD1,c23 ; c23 = 0.0f, 1.0f, 0.0f, 1.0f - GREEN
where c5 is setup by the app with a value varying between 0 and 1
included (same value for each component of c5).
AlphaBlend = false
AlphaTest = false
Now the results are :
when c5 == 0, the color is RED ! (should be GREEN)
when c5 moves from >0 to <1, the color gradually turns from GREEN to
RED, which is correct;
when c5 == 1, the color is YELLOW ! (should be RED)
Isn't it crazy ? Is there a workaround? Bug in the GPU?
Doc says : Conditionally chooses between src1 and src2, based on the
comparison src0 >= 0
Actually the experiment shows it is a strict comparison (src0 > 0).
Do replace the PS1.4 line by "cmp r0,c5,v0,v1" and when C5==0, the color
is GREEN (should stay RED)
Finally in that case, CMP is the same as CND used with a bias modifier
on src0, which then makes the latter pretty useless ( cnd dest,src0,...
== cmp dest,src0_bias,... )...
So, CMP bugged or doc wrong ?
Do LRP and CMP suffer a common bug (for instance LRP would make implicit
use of CMP somehow) ?