[Mesa-dev] shader_test for glsl-to-tgsi ceil bug

Christoph Bumiller e0425955 at student.tuwien.ac.at
Mon May 7 16:16:12 PDT 2012


On 05/07/2012 08:34 PM, Eric Anholt wrote:
> On Sat, 05 May 2012 14:43:44 +0200, Christoph Bumiller
> <e0425955 at student.tuwien.ac.at> wrote:
>> Test case for the "glsl_to_tgsi: use TGSI_OPCODE_CEIL for
>> ir_unop_ceil" patch attached.
> 
> This wasn't caught by the generated test for ceil()?  That seems
> strange.
It's not, because it's not really meant to test the functionality of
ceil() itself, but rather a bug in glsl-to-tgsi, which implemented it
as -floor(-x), that causes the second negation to be lost if the
result was used in a certain way, like the reciprocal here.

I just sent the test along to illustrate the bug my patch was supposed
to fix, although including those kinds of failures in piglit would
probably be a good idea, too.

Of course testing multiple values, including fractional ones, won't
harm either, even if it doesn't make a difference for that specific bug.


More information about the mesa-dev mailing list