From: Marek Olšák <[email protected]>
Yes, the result of the function must be non-zero but is otherwise undefined.
---
.../spec/arb_texture_query_levels/execution/fs-nomips.shader_test | 8 ++++----
.../spec/arb_texture_query_levels/execution/vs-nomips.shader_test | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git
a/tests/spec/arb_texture_query_levels/execution/fs-nomips.shader_test
b/tests/spec/arb_texture_query_levels/execution/fs-nomips.shader_test
index 3702c86..1e295d6 100644
--- a/tests/spec/arb_texture_query_levels/execution/fs-nomips.shader_test
+++ b/tests/spec/arb_texture_query_levels/execution/fs-nomips.shader_test
@@ -8,10 +8,12 @@ GL_ARB_texture_query_levels
#extension GL_ARB_texture_query_levels: require
uniform sampler2D s;
-uniform int expected;
+
+// The only thing the spec says about textures without a minification filter
is:
+// "If the texture is complete, a non-zero value must be returned."
void main() {
- if (textureQueryLevels(s) == expected)
+ if (textureQueryLevels(s) != 0)
gl_FragColor = vec4(0,1,0,0);
else
gl_FragColor = vec4(1,0,0,0);
@@ -28,7 +30,5 @@ uniform int s 0
texparameter 2D min nearest
texparameter 2D mag nearest
-uniform int expected 1
-
draw rect -1 -1 2 2
relative probe rgba (0.5, 0.5) (0, 1, 0, 0)
diff --git
a/tests/spec/arb_texture_query_levels/execution/vs-nomips.shader_test
b/tests/spec/arb_texture_query_levels/execution/vs-nomips.shader_test
index 904d506..ad70e02 100644
--- a/tests/spec/arb_texture_query_levels/execution/vs-nomips.shader_test
+++ b/tests/spec/arb_texture_query_levels/execution/vs-nomips.shader_test
@@ -9,11 +9,13 @@ in vec4 vertex;
out vec4 color;
uniform sampler2D s;
-uniform int expected;
+
+// The only thing the spec says about textures without a minification filter
is:
+// "If the texture is complete, a non-zero value must be returned."
void main() {
gl_Position = vertex;
- if (textureQueryLevels(s) == expected)
+ if (textureQueryLevels(s) != 0)
color = vec4(0,1,0,0);
else
color = vec4(1,0,0,0);
@@ -37,7 +39,5 @@ uniform int s 0
texparameter 2D min nearest
texparameter 2D mag nearest
-uniform int expected 1
-
draw rect -1 -1 2 2
relative probe rgba (0.5, 0.5) (0, 1, 0, 0)
--
1.9.1
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit