[Piglit] [PATCH 1/2] arb_shader_image_size/builtin: Fix the CubeMap image test
Martin Peres
martin.peres at linux.intel.com
Wed Aug 12 05:42:44 PDT 2015
Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
---
tests/spec/arb_shader_image_size/builtin.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/spec/arb_shader_image_size/builtin.c b/tests/spec/arb_shader_image_size/builtin.c
index cb427df..48a1d1e 100755
--- a/tests/spec/arb_shader_image_size/builtin.c
+++ b/tests/spec/arb_shader_image_size/builtin.c
@@ -104,6 +104,15 @@ check(const struct grid_info grid, struct image_info img_src)
*/
ret &= check_pixels(img, pixels, img_src.size.x, img_src.size.y,
img_src.size.z / 6.0, img_src.size.w);
+ } else if (img_src.target->target == GL_TEXTURE_CUBE_MAP) {
+ /* Unlike image-load-store's size (exported by the framework
+ * used for this test), image-size reports only the size of one
+ * face, not including the number of faces. From the
+ * ARB_shader_image_size extension:
+ * "Cube images return the dimensions of one face."
+ */
+ ret &= check_pixels(img, pixels, img_src.size.x, img_src.size.y,
+ 1.0, 1.0);
} else if (image_target_samples(img_src.target) > 1) {
/* Unlike image-load-store's size (exported by the framework
* used for this test), image-size does not report the sample
--
2.5.0
More information about the Piglit
mailing list