[Piglit] [PATCH 2/2] AMD_texture_texture4: new test
Marek Olšák
maraeo at gmail.com
Thu Nov 29 01:20:50 UTC 2018
From: Marek Olšák <marek.olsak at amd.com>
based on some ARB_texture_gather5 test.
---
.../execution/texture4.shader_test | 84 +++++++++++++++++++
1 file changed, 84 insertions(+)
create mode 100644 tests/spec/amd_texture_texture4/execution/texture4.shader_test
diff --git a/tests/spec/amd_texture_texture4/execution/texture4.shader_test b/tests/spec/amd_texture_texture4/execution/texture4.shader_test
new file mode 100644
index 000000000..b27974d7a
--- /dev/null
+++ b/tests/spec/amd_texture_texture4/execution/texture4.shader_test
@@ -0,0 +1,84 @@
+[require]
+GLSL >= 1.10
+GL_AMD_texture_texture4
+
+[vertex shader]
+void main()
+{
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
+
+[fragment shader]
+#extension GL_AMD_texture_texture4 : require
+/* Verify that gather4 always samples from the base level of a mipmapped texture */
+
+uniform sampler2D tex;
+
+void main()
+{
+ gl_FragColor = texture4(tex, vec2(0.5, 0.5));
+}
+
+[test]
+uniform int tex 0
+texture miptree 0
+texparameter 2D min linear_mipmap_linear
+texparameter 2D mag nearest
+
+texparameter 2D base_level 0
+
+texparameter 2D swizzle_r red
+draw rect -1 -1 0.5 0.5
+relative probe rgb (0.125, 0.125) (1.0, 1.0, 1.0)
+texparameter 2D swizzle_r green
+draw rect -0.5 -1 0.5 0.5
+relative probe rgb (0.375, 0.125) (0.0, 0.0, 0.0)
+texparameter 2D swizzle_r blue
+draw rect 0 -1 0.5 0.5
+relative probe rgb (0.625, 0.125) (0.0, 0.0, 0.0)
+texparameter 2D swizzle_r alpha
+draw rect 0.5 -1 0.5 0.5
+relative probe rgb (0.875, 0.125) (1.0, 1.0, 1.0)
+
+texparameter 2D base_level 1
+
+texparameter 2D swizzle_r red
+draw rect -1 -0.5 0.5 0.5
+relative probe rgb (0.125, 0.375) (0.0, 0.0, 0.0)
+texparameter 2D swizzle_r green
+draw rect -0.5 -0.5 0.5 0.5
+relative probe rgb (0.375, 0.375) (1.0, 1.0, 1.0)
+texparameter 2D swizzle_r blue
+draw rect 0 -0.5 0.5 0.5
+relative probe rgb (0.625, 0.375) (0.0, 0.0, 0.0)
+texparameter 2D swizzle_r alpha
+draw rect 0.5 -0.5 0.5 0.5
+relative probe rgb (0.875, 0.375) (1.0, 1.0, 1.0)
+
+texparameter 2D base_level 2
+texparameter 2D swizzle_r red
+draw rect -1 0 0.5 0.5
+relative probe rgb (0.125, 0.625) (0.0, 0.0, 0.0)
+texparameter 2D swizzle_r green
+draw rect -0.5 0 0.5 0.5
+relative probe rgb (0.375, 0.625) (0.0, 0.0, 0.0)
+texparameter 2D swizzle_r blue
+draw rect 0 0 0.5 0.5
+relative probe rgb (0.625, 0.625) (1.0, 1.0, 1.0)
+texparameter 2D swizzle_r alpha
+draw rect 0.5 0 0.5 0.5
+relative probe rgb (0.875, 0.625) (1.0, 1.0, 1.0)
+
+texparameter 2D base_level 3
+texparameter 2D swizzle_r red
+draw rect -1 0.5 0.5 0.5
+relative probe rgb (0.125, 0.875) (1.0, 1.0, 1.0)
+texparameter 2D swizzle_r green
+draw rect -0.5 0.5 0.5 0.5
+relative probe rgb (0.375, 0.875) (1.0, 1.0, 1.0)
+texparameter 2D swizzle_r blue
+draw rect 0 0.5 0.5 0.5
+relative probe rgb (0.625, 0.875) (1.0, 1.0, 1.0)
+texparameter 2D swizzle_r alpha
+draw rect 0.5 0.5 0.5 0.5
+relative probe rgb (0.875, 0.875) (1.0, 1.0, 1.0)
--
2.17.1
More information about the Piglit
mailing list