[Piglit] [PATCH] copyteximage: Fix the test to eliminate GL_TEXTURE_1D failures on NVIDIA

Anuj Phogat anuj.phogat at gmail.com
Tue Aug 21 18:31:46 PDT 2012


On Tue, Aug 21, 2012 at 5:57 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Tue, Aug 21, 2012 at 4:32 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>> Draw and probe a QUAD (in place of a LINE) in case of GL_TEXTURE_1D. This
>> fixes the test failures on NVIDIA's proprietary linux drivers. In case of
>> LINE, glReadPixels() misses the relevant pixels by one pixel on NVIDIA.
>>
>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>> ---
>> Brian, both these patches (including the one I sent earlier today) resolve
>> separate issues. So, I'm keeping this fix in a separate patch. Let me know
>> if you have any comments on the patches.
>>
>>  tests/texturing/copyteximage.c |   16 +++++-----------
>>  1 files changed, 5 insertions(+), 11 deletions(-)
>
> I've only been following this casually, but does this cover up a test
> failure on NVIDIA? They've got a bug -- right? I don't understand why
> we'd want to modify the test so that it misses the driver bug.

I don't think this is a driver bug. NVIDIA's GPU might be using a different
line rasterization algorithm which generates slightly different fragments as
compared to intel's GPU. OpenGL 3.0 specification, section 3.5.1 says:
"Because the initial and final conditions of the diamond-exit rule may
be difficult
to implement, other line segment rasterization algorithms are allowed,
subject to
the following rules:
1. The coordinates of a fragment produced by the algorithm may not deviate by
more than one unit in either x or y window coordinates from a corresponding
fragment produced by the diamond-exit rule."
This might or might not be the case with NVIDIA's driver.


More information about the Piglit mailing list