On Fri, Jan 10, 2014 at 5:25 PM, Anuj Phogat <anuj.pho...@gmail.com> wrote: > On Thu, Jan 9, 2014 at 4:34 PM, Chris Forbes <chr...@ijw.co.nz> wrote: >> Hi Anuj, >> >> There's one fiddly interaction that I don't think this handles quite >> right, although I think it does conform. >> >> Suppose we have this fragment shader: >> >> #version 330 >> #extension ARB_gpu_shader5: require >> >> sample in vec4 a; >> in vec4 b; >> >> ... >> >> Then `b` is being evaluated at the sample position as well. This is >> allowed by my reading of the spec, but probably not what the author >> expected. > Good catch. >> >> From the ARB_gpu_shader5 spec, emphasis mine: >> >> (11) Should we support per-sample interpolation of attributes? If so, >> how? >> >> RESOLVED. Yes. When multisample rasterization is enabled, qualifying >> one or more fragment shader inputs with "sample" will force per-sample >> interpolation of those attributes. If the same shader includes other >> fragment inputs not qualified with sample, those attributes _may_ be >> interpolated per-pixel (i.e., all samples get the same values, likely >> evaluated at the pixel center). >> >> What do you think? > I agree with your interpretation. Spec seems to be flexible about it. I'll > check > what NVIDIA does in this case. This should be easy to fix if we need to. I verified that NVIDIA doesn't evaluate variable 'b' at sample position. I'll send out an updated patch to match this behavior.
>> >> -- Chris _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev