aboutsummaryrefslogtreecommitdiff
path: root/tests/shaders/generic/fdo30337b.vpfp
blob: e6809fc282f6d7b942b5931c8688f3cf015bb92f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
!!ARBvp1.0
OPTION ARB_position_invariant;
END

!!ARBfp1.0
#This test is for instructions that read from more components than the
#presubtract operation writes.  For example:
#ADD Temp[0].x Temp[1].x, Temp[2].x
#MUL Temp[4]x. Temp[0].x, Temp[5].x
#DP3 Temp[6].x Temp[0].xyz, Temp[0].xyz
#The ADD instruction can be converted to a presubtract operation and be
#used by the MUL instruction, but it cannot be used by the DP3 instruction
#since that instruction reads from more than just the x component of Temp[0].
#Therefore the ADD instruction should not be removed.
TEMP color;
MOV color, {0.1, 0.4, 0.8, 1.0};
SUB color.x, color.x, color.x;
ADD color.y, color.x, color.y;
SUB color.z, color.x, color.x;
DP3 color.w, color, color;
MOV result.color, color;
END

!!test
expected          0.0     0.4      0.0      0.16