[Piglit] [PATCH] glsl-1.10 / glsl-1.20: Relax precision requirements of variable indexing tests

Kenneth Graunke kenneth at whitecape.org
Wed Aug 28 12:02:39 PDT 2013

On 08/21/2013 08:44 PM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
> Many of these tests fail on older GPU such as Intel i915 due to the
> precision requirement.  This is because many GPUs in this class only use
> 24-bit floats.  Many also implement many instructions cheaply (with poor
> precision).
> Do a couple things to relax the precision requirement.  First, use the
> distance squared instead of the distance.  This saves an
> inverse-square-root and a multiple.  The inverse-square-root has
> notoriously poor precision on old GPUs.  Second, pick a precision that
> passes on at least one 24-bit float GPU.  I picked 4e-9 because that was
> the smallest bound that would pass on i915.
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> I suspect that r300 GPUs also fail these tests, but I don't have any of
> that hardware around.  Could someone test before and after for me? :)
> This is also not the full patch.  The full patch is ~300kb, so the list
> server would have rejected it.  This is just a handful of representitive
> tests and the generator script.

This looks reasonable to me.  Removing #version 110 seemed unrelated, 
but I see that it happened just by rerunning the generator script (and 
should've been checked in earlier), so I'm OK with it.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

More information about the Piglit mailing list