From: Brian P. <br...@vm...> - 2009-12-08 17:23:53
|
A coworker found that glean was hitten an assertion failure in treadpixperf.cpp when doing results comparisons. I tracked the issue down to a problem with the drawing surface config matching code. A glean results file contains some number of drawing surface config descriptions followed by test-specific results. When comparing results, glean tries to finding matching ds configs in the two files to compare. The DrawingSurfaceConfig::match() function was doing a poor job of matching configs so we wound up trying to compare test results from (very) different configs and failing. In particular, this bit of code is used to compare the Z and stencil attributes: if (z && c.z) error += abs(z - c.z); if (s && c.s) error += abs(s - c.s); If z = 0 and c.z = 24 the error variable wasn't updated. I believe the correct way to do this is simply: error += abs(z - c.z); error += abs(s - c.s); Furthermore, other fields like db and stereo weren't even compared. Even after I fixed this, however, the matching code sometimes found that two configs were matches when there were in fact other, even better/exact matches. To fix this, I modified the match function to first look for an _exact_ match where all fields (including X visual ID) were the same. If that fails, then try the error-based matching algorithm. Furthermore, I modifed the error-based comparison code to check more fields and use different error weights for different fields. The attached patch implements these changes. The treadpixperf assertion no longer fails and everything else I've tested works properly. If there are no concerns/objections I'll commit this later. Be sure you grab the latest code from git. I just recently committed some other fixes (uninitialized memory, etc). -Brian |