On 26 August 2012 18:04, Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div>On Thu, Aug 23, 2012 at 11:39 PM, Paul Berry <<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@gmail.com</a>> wrote:<br>
> On 23 August 2012 10:42, Marek Olšák <<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, Aug 23, 2012 at 6:42 PM, Paul Berry <<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@gmail.com</a>><br>
>> wrote:<br>
>> > On 22 August 2012 18:54, Marek Olšák <<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>> wrote:<br>
>> >><br>
>> >> The original samples positions took samples outside of the pixel<br>
>> >> boundary,<br>
>> >> leading to dark pixels on the edge of the colorbuffer, among other<br>
>> >> things.<br>
>> ><br>
>> ><br>
>> > Does this address the issues you were having with the error thresholds<br>
>> > in<br>
>> > the EXT_framebuffer_multisample piglit tests (Re: your Aug 13 email<br>
>> > "[Piglit] [PATCH] ext_framebuffer_multisample: relax MSAA precision")?<br>
>><br>
>> Yes, it does. The accuracy tests now pass for me.<br>
>><br>
>> Marek<br>
><br>
><br>
> Excellent.  Glad to hear it.<br>
<br>
</div></div>Sorry, the tests actually don't pass, I tested with the piglit patch<br>
applied. :( However this patch reduces the error quite a lot, it's<br>
just not enough. I guess I have to choose the sample positions very<br>
carefully.<br>
<span><font color="#888888"><br>
Marek<br>
</font></span></blockquote></div><br>If it helps any, here are the positions I used for 8x MSAA on Intel hardware (from src/mesa/drivers/dri/i965/gen6_multisample_state.c).  I don't know what the capabilities of r600g are, but if it can reproduce the same sample positions that would be a nice quick way to double check whether the remaining inaccuracy is caused by sample positions:<br>


<br><span style="font-family:courier new,monospace">       * Sample positions:</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">       *   1 3 5 7 9 b d f</span><br style="font-family:courier new,monospace">


<span style="font-family:courier new,monospace">       * 1     5</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">       * 3           2</span><br style="font-family:courier new,monospace">


<span style="font-family:courier new,monospace">       * 5               6</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">       * 7 4</span><br style="font-family:courier new,monospace">


<span style="font-family:courier new,monospace">       * 9       0</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">       * b             3</span><br style="font-family:courier new,monospace">


<span style="font-family:courier new,monospace">       * d         1</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">       * f   7</span><br style="font-family:courier new,monospace">


<br>Intel hardware specifies the sample positions in offsets of 1/16 pixel, with 8=pixel center, so for example in the above diagram, sample number 2 has x coordinate of 0xb, meaning 3/16 pixel to the right of center.  I *think* that means you'll have to subtract 8 from each coordinate to get the values you want to use on r600g.<br>


<br>Here's the results I get for "ext_framebuffer_multisample-accuracy 8 color" on Ivy Bridge:<br><br>Pixels that should be unlit<br>  count = 214644<br>  Perfect output<br>Pixels that should be totally lit<br>
  count = 28972<br>  Perfect output<br>Pixels that should be partially lit<br>  count = 18528<br>  RMS error = 0.060891<br>The error threshold for this test is 0.071928<br><br>I also tried using your sample positions with the Intel driver (I think I'm interpreting eg_sample_locs_8x correctly), and I got these results:<br>
<br>Pixels that should be unlit<br>  count = 214644<br>  Perfect output<br>Pixels that should be totally lit<br>  count = 28972<br>  Perfect output<br>Pixels that should be partially lit<br>  count = 18528<br>  RMS error = 0.068037<br>
The error threshold for this test is 0.071928<br>
<br>Which also passes, but by a narrower margin.<br><br>I'm curious what results you are getting.  Perhaps there is a problem with downsampling?<br>