[Piglit] [PATCH] New test for ARB_color_buffer_float

Luca Barbieri luca at luca-barbieri.com
Wed Aug 25 07:57:06 PDT 2010

A new test for ARB_color_buffer_float is attached, which currently has
no tests in either mesa-demos or piglit.
ARB_texture_float is required to test 16-bit and 32-bit floating point
targets, and otherwise only 8-bit fixed-point will tested.

Mesa does not support this extension, but the proprietary drivers from
both nVidia and ATI advertise it, and have been used to write this

Note that both nVidia and ATI drivers are nonconformant in serious
ways (and the bugs are all different between them).

This test detects nVidia and ATI drivers and ignores all knows bugs,
so that it should pass on both (but it still loudly complains about
the bugs).
This is intended to allow to check that the test itself is correct,
until an actually conformant implementation becomes available.

Note that the nVidia driver was tested on nv40, and the situation
might be better on nv50 and Fermi.
The ATI driver was instead tested on Cypress, and thus is most likely
broken on all cards.

The main (and essentially only) feature of this extension is the
ability to control clamping to [0, 1] in several places.
This is really tricky to get right (as ATI and nVidia's failure to do
so shows), and thus the test tries a lot of variations to try to
maximize confidence in the correctness of an implementation.

It would be nice to test that the alpha test and polygon smoothing are
correct too (i.e. they happen after fragment clamping and before blend
clamping, if any), and improvements in this direction would be
Tests for other target formats would also be nice to have, especially
for different cases like unnormalized integer and unsigned floating

The test is somewhat preliminary and could use some code cleanups, as
well as testing on i965, r300, r500, nv50, Fermi with the proprietary
Also having a conformant implementation would help in making sure the
test is really correct: for now testing on both nVidia and ATI drivers
kind of approximates that.

It includes relevant quotes from the specification, which I believe is
OK under fair use and the fact that it's available on a public server
anyway. They can be easily removed if desired.

Is this OK for inclusion?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fbo-float.c.gz
Type: application/x-gzip
Size: 5562 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20100825/adcf3eb1/attachment.bin>

More information about the Piglit mailing list