[Piglit] cleanups to tesselation generators
baker.dylan.c at gmail.com
Wed Oct 7 14:17:01 PDT 2015
This series began it's life as an attempt to get the tessalation
generators running in python 3.x.
And then I noticed how much code was duplicated between the two
generators, and spend 20 patches cleaning up style issues, removing
semi-colons, remove unused imprts, sorting imports, using
textwrap.dedent, remove semi-colons, fixing whitespace issues, removing
mixed tabs/spaces, etc.
In the end I removed a bunch of duplicate code, and got it generating in
python 3.x, and discovered that python 3.x produced very different
results than python 2.x did. So I decided to port to numpy and see what
happened. Numpy produces numbers very similar to python 3.x (with a very
tiny loss of precision, something like .000000000xx IIRC), when using
both python 2.7.10 and python 3.3.6 (python 2.x and 3.x produce the same
value with numpy).
However, I have a problem. I don't currently have access to anything
other than i965 (HSW specifically), and tesselation isn't ready yet, so
I have no way to test these changes.
There is a second issue I think. These tests use random to generate
values. I ran the tests a considerable number of times (somewhere in the
1000's of times), and they always produced the same result the first
time (don't make the mistake of calling them by importing into python,
they don't always produce the same result that way). However, I feel
somewhat uncomfortable with tests using random data (even if we're
seeding the generator to ensure deterministic values).
Therefore I've sent these out RFC, with the hope that someone with
RadeonSI or Nouveau will give them a shot and see if there are any
regressions. And, so that other might comment on the use of random in
More information about the Piglit