[Piglit] [PATCH 2/2] arb_shader_stencil_export: Compare all values
Neil Roberts
neil at linux.intel.com
Fri Nov 6 08:18:28 PST 2015
Ben Widawsky <benjamin.widawsky at intel.com> writes:
> - glReadPixels(0, 0, 3, 1, GL_STENCIL_INDEX, GL_FLOAT, p);
> + glReadPixels(0, 0, 256, 256, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, p);
> piglit_present_results();
>
> /* we hardcode 129 in the shader */
> - if (p[0] != 129)
> - pass = GL_FALSE;
> - return pass ? PIGLIT_PASS : PIGLIT_FAIL;
> + for (i = 0; i < 256 * 256; i++)
> + if (p[i] != 129)
> + return PIGLIT_FAIL;
I think you could use piglit_probe_rect_stencil here if you wanted to
make this a bit simpler. That way it would also report the position if
it finds a difference.
Regards,
- Neil
More information about the Piglit
mailing list