Ian Romanick <i...@freedesktop.org> writes: >> To fix that this patch makes it use interpolateAtOffset in the blit >> shader whenever 16x MSAA is used and the GL_ARB_gpu_shader5 extension >> is available. This forces it to interpolate the texture coordinates at >> the pixel center to avoid these problematic positions. > > Would it also work to use "centroid in" interpolation qualifier? Do we > have any data about the relative cost of the three interpolation > methods?
I don't think centroid interpolation does anything for per-sample shading. Centroid interpolation is just meant to ensure that the interpolated values are within the polygon (it's confusingly named and has nothing to do with the center). For per-sample shading the sample position will always be within the polygon so it will just use that for the interpolation and we would be stuck with the same problem that some of these positions are on the pixel boundary. >> + >> + if (ctx->Extensions.ARB_gpu_shader5 && samples >= 16) { >> + extra_extensions = >> + "#extension GL_ARB_sample_shading : enable\n" >> + "#extension GL_ARB_gpu_shader5 : enable\n"; > > You can unconditionally add the enables. If the implementation doesn't > support the extension, enable will still succeed while require will > not. Ok, yes that is probably worth doing. The GL_ARB_sample_shading one was already conditionally added before my patch, so maybe I can make a second patch that first stops it from doing that. Thanks for looking at the patch. Regards, - Neil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev