[Piglit] cleanups to tesselation generators

Dylan Baker baker.dylan.c at gmail.com
Wed Oct 7 14:30:20 PDT 2015


On Wed, Oct 07, 2015 at 02:17:01PM -0700, Dylan Baker wrote:
> 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
> test generators.
> 

rant: Gmail serious makes me mad, it keeps hanging up on me with large
emails. grrrr


anyway, you can look at the truncated patches or download from my git
repo:
https://github.com/dcbaker/piglit.git wip/gen_tes_inputs_python3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151007/f9194c7c/attachment.sig>


More information about the Piglit mailing list