8 OPTION ARB_position_invariant;
13 #This test is for instructions that read from more components than the
14 #presubtract operation writes. For example:
15 #ADD Temp[0].x Temp[1].x, Temp[2].x
16 #MUL Temp[4]x. Temp[0].x, Temp[5].x
17 #DP3 Temp[6].x Temp[0].xyz, Temp[0].xyz
18 #The ADD instruction can be converted to a presubtract operation and be
19 #used by the MUL instruction, but it cannot be used by the DP3 instruction
20 #since that instruction reads from more than just the x component of Temp[0].
21 #Therefore the ADD instruction should not be removed.
23 MOV color, {0.1, 0.4, 0.8, 1.0};
24 SUB color.x, color.x, color.x;
25 ADD color.y, color.x, color.y;
26 SUB color.z, color.x, color.x;
27 DP3 color.w, color, color;
28 MOV result.color, color;
33 clear color 1.0 1.0 1.0 1.0
36 probe all rgba 0.0 0.4 0.0 0.16