[Piglit] [PATCH] ext_framebuffer_multisample: relax MSAA precision
Marek Olšák
maraeo at gmail.com
Wed Aug 15 11:14:54 PDT 2012
It might be caused by the sample positions extending outside of the
pixel boundary. I'll see if a different configuration passes the test.
Marek
On Wed, Aug 15, 2012 at 12:16 AM, Paul Berry <stereotype441 at gmail.com> wrote:
> On 13 August 2012 10:31, Marek Olšák <maraeo at gmail.com> wrote:
>>
>> r600g needs this to successfully pass the 8x MSAA accuracy tests.
>
>
> This test passes as-is on Mesa's Intel driver with 4x and 8x, and with
> nVidia's binary blob with everything from 2x through 32x, so it seems much
> more likely that the test is correct, and you are seeing a genuine driver
> bug. (For example, is it possible that your sample positions aren't
> properly centered on the pixel, or extend outside the pixel boundary?)
>
> Does the test also fail on the proprietary driver for r600g? If it passes,
> then I think we should leave the test as is. If the proprietary driver
> fails too, then I'd like to understand what it is about the r600g hardware's
> MSAA implementation that causes it to be so inaccurate. If r600g's MSAA
> implementation is really this bad, then perhaps we should just blacklist the
> test for r600g, so that we don't weaken the testing of other platforms.
>
> I'm particularly concerned to see the changes you're suggesting to the
> is_perfect() function--this is used to verify that rendering is correct for
> pixels that are completely covered or completely uncovered. I'm having
> trouble imagining how a correct implementation would get these pixels wrong.
>
> If you're certain that the r600g implementation is correct, could you
> perhaps provide some information about what is unique about r600g's
> implementation of MSAA that causes it to be less accurate than Intel's or
> nVidia's, but nonetheless spec compliant? And perhaps send us a screenshot
> of the test so we can understand what's going wrong?
>
> Paul
>
>>
>> ---
>> tests/spec/ext_framebuffer_multisample/common.cpp | 10 +++++-----
>> tests/spec/ext_framebuffer_multisample/common.h | 2 +-
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/tests/spec/ext_framebuffer_multisample/common.cpp
>> b/tests/spec/ext_framebuffer_multisample/common.cpp
>> index 412bf01..6f994b3 100644
>> --- a/tests/spec/ext_framebuffer_multisample/common.cpp
>> +++ b/tests/spec/ext_framebuffer_multisample/common.cpp
>> @@ -1311,9 +1311,9 @@ Stats::summarize()
>> }
>>
>> bool
>> -Stats::is_perfect()
>> +Stats::is_satisfactory()
>> {
>> - return sum_squared_error == 0.0;
>> + return sqrt(sum_squared_error / count) < 0.003;
>> }
>>
>> bool
>> @@ -1607,10 +1607,10 @@ Test::measure_accuracy()
>>
>> printf("Pixels that should be unlit\n");
>> unlit_stats.summarize();
>> - pass = unlit_stats.is_perfect() && pass;
>> + pass = unlit_stats.is_satisfactory() && pass;
>> printf("Pixels that should be totally lit\n");
>> totally_lit_stats.summarize();
>> - pass = totally_lit_stats.is_perfect() && pass;
>> + pass = totally_lit_stats.is_satisfactory() && pass;
>> printf("Pixels that should be partially lit\n");
>> partially_lit_stats.summarize();
>>
>> @@ -1630,7 +1630,7 @@ Test::measure_accuracy()
>> * log2(num_samples).
>> */
>> int effective_num_samples = num_samples == 0 ? 1 :
>> num_samples;
>> - error_threshold = 0.333 *
>> + error_threshold = 0.36 *
>> pow(0.6, log((double)effective_num_samples) /
>> log(2.0));
>> }
>> printf("The error threshold for this test is %f\n",
>> error_threshold);
>> diff --git a/tests/spec/ext_framebuffer_multisample/common.h
>> b/tests/spec/ext_framebuffer_multisample/common.h
>> index 710d77e..7dcf0e6 100644
>> --- a/tests/spec/ext_framebuffer_multisample/common.h
>> +++ b/tests/spec/ext_framebuffer_multisample/common.h
>> @@ -478,7 +478,7 @@ public:
>>
>> void summarize();
>>
>> - bool is_perfect();
>> + bool is_satisfactory();
>>
>> bool is_better_than(double rms_error_threshold);
>>
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> Piglit mailing list
>> Piglit at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/piglit
>
>
More information about the Piglit
mailing list