File: fdo30337b.shader_test

package info (click to toggle)
piglit 0~git20200212-f4710c51b-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 106,972 kB
  • sloc: ansic: 263,763; xml: 48,941; python: 29,918; lisp: 19,789; cpp: 12,142; sh: 22; makefile: 20; pascal: 5
file content (37 lines) | stat: -rw-r--r-- 963 bytes parent folder | download | duplicates (5)
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
26
27
28
29
30
31
32
33
34
35
36
37
[require]
GL >= 1.3
ARB_vertex_program
ARB_fragment_program

[vertex program]
!!ARBvp1.0
OPTION ARB_position_invariant;
END

[fragment program]
!!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]
ortho 0 1 0 1
clear color 1.0 1.0 1.0 1.0
clear
draw rect 0 0 1 1
probe all rgba 0.0 0.4 0.0 0.16