On 08/09/2013 03:42 AM, Topi Pohjolainen wrote:
As GLES reads pixels as non-normalized integers compare the
integers directly instead of transforming to floats first.
Signed-off-by: Topi Pohjolainen <[email protected]>
---
tests/util/piglit-util-gl-common.h | 2 ++
tests/util/piglit-util-gles.c | 63 ++++++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+)
+unsigned
+piglit_num_components(GLenum base_format)
+{
+ switch (base_format) {
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_LUMINANCE_ALPHA:
+ case GL_RGB:
+ return 3;
+ case GL_RGBA:
+ return 4;
+ default:
+ printf("Unknown num_components for %s\n",
+ piglit_get_gl_enum_name(base_format));
+ piglit_report_result(PIGLIT_FAIL);
+ return 0;
+ }
+}
The number of components for alpha and luminance should be 1, and
luminance_alpha should
be 2. See piglit-util-gl.c:piglit_num_components().
Also, the commit subject shouldn't begin with "framework". That refers to the
toplevel 'framework' directory filled with python files. The subject's prefix
should instead be "util" or "util/gl".
With those two things fixed, this patch is
Reviewed-by: Chad Versace <[email protected]>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit