blob: ecd56bc64a7361e17bf01095b89ba96b2139afdf (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
[require]
GLSL >= 1.30
GL_ARB_texture_query_levels
[vertex shader]
#extension GL_ARB_texture_query_levels: require
in vec4 vertex;
out vec4 color;
uniform sampler2D s;
uniform int expected;
void main() {
gl_Position = vertex;
if (textureQueryLevels(s) == expected)
color = vec4(0,1,0,0);
else
color = vec4(1,0,0,0);
}
[fragment shader]
in vec4 color;
void main() {
gl_FragColor = color;
}
[test]
ortho
clear color 0.4 0.4 0.4 0
clear
texture miptree 0
uniform int s 0
texparameter 2D min nearest_mipmap_nearest
texparameter 2D mag nearest
texparameter 2D base_level 0
texparameter 2D max_level 2
uniform int expected 3
draw rect -1 -1 2 2
relative probe rgba (0.5, 0.5) (0, 1, 0, 0)
|