[Piglit] [PATCH v5 0/3] arb_shader_precision: tolerances updates

Micah Fedke micah.fedke at collabora.co.uk
Fri Apr 3 13:59:49 PDT 2015


This revision of the patch series take a more straightforward approach to
calculating the tolerances for complex functions.  Although not simple to
discover, it is simple to say that complex floating point equations which have
multiply-add sequences that might be optimized into an fma() by a compiler are
nearly impossible to test completely, since it is impossible to know how any
given compiler optimized (or didn't) for fma().  Also, the multiply-add
operation itself is a complex equation that can introduce its own error
depending on the input values.  This patch series checks those complex
functions which are free of potential fma() optimization, but also checks fma()
and a*b+c as standalone operations, where error is reasonably under control.
This latest revision also takes the opportunity to update the tolerance ranges
to meet the new language introduced in the GLSL spec v4.10.

git repo:
http://cgit.collabora.com/git/user/fedke.m/piglit.git/log/?h=complex_tolerances_straight

Acked-by: Chris Forbes <chrisf at ijw.co.nz>

Updates since previous revision:
 - updated fs shader tests (gen and hand written) with [vertex shader passthrough]
 - split manual fma tests into separate patch
 - added more fma test vectors: one additional "nasty" non-zero vector, and two
   equal-result vectors

Micah Fedke (3):
  arb_shader_precision: support scalar values in shader_runner_format
  arb_shader_precision: add framework for calculating tolerances for
    complex functions     - update mako templates to support vectors of
    tolerances
  arb_shader_precision: add manually written tests for a*b+c and fma()

 generated_tests/gen_shader_precision_tests.py      | 166 ++++++++++++++++-----
 .../templates/gen_shader_precision_tests/fs.mako   |  62 ++++----
 .../templates/gen_shader_precision_tests/gs.mako   |  55 ++++---
 .../templates/gen_shader_precision_tests/vs.mako   |  55 ++++---
 .../fs-fma-float-float-float.shader_test           |  56 +++++++
 .../fs-manual-fma-float-float-float.shader_test    |  56 +++++++
 .../gs-fma-float-float-float.shader_test           |  80 ++++++++++
 .../gs-manual-fma-float-float-float.shader_test    |  80 ++++++++++
 .../vs-fma-float-float-float.shader_test           |  65 ++++++++
 .../vs-manual-fma-float-float-float.shader_test    |  65 ++++++++
 10 files changed, 634 insertions(+), 106 deletions(-)
 create mode 100644 tests/spec/arb_shader_precision/fs-fma-float-float-float.shader_test
 create mode 100644 tests/spec/arb_shader_precision/fs-manual-fma-float-float-float.shader_test
 create mode 100644 tests/spec/arb_shader_precision/gs-fma-float-float-float.shader_test
 create mode 100644 tests/spec/arb_shader_precision/gs-manual-fma-float-float-float.shader_test
 create mode 100644 tests/spec/arb_shader_precision/vs-fma-float-float-float.shader_test
 create mode 100644 tests/spec/arb_shader_precision/vs-manual-fma-float-float-float.shader_test

-- 
2.3.5



More information about the Piglit mailing list