This patch enables ext_framebuffer_multisample_blit_scaled extension on intel h/w >= gen6.
Note: Patches for piglit tests to verify this functionality are out for review on piglit mailing list. Comment history: Paul Berry on v1 of my implementation: "I have some concerns about the image quality of the method you've implemented. As I understand it, the primary use case of this extension is to allow the client to do multisampled rendering at slightly less than screen resolution (e.g. 720p instead of 1080p), and then blit the result to the screen in one step while keeping most of the quality benefits of multisampling. Since your implementation is effectively equivalent to downsampling and then blitting using GL_NEAREST filtering, my fear is that it will lead to blocky artifacts that are severe enough to negate the benefit of multisampling in the first place. Anuj Phogat proposed v2: My latest implementation uses bilinear filtering of samples within a texel and addresses most of the above concerns. It produces images which are free from blocky artifacts and show big improvement in visual quality. Here is a link to an image comparing the rendering quality on Intel and NVIDIA drivers: https://www.dropbox.com/s/m90lqqrj2vjps3g/scaled-blit.png Paul Berry on v2: There is a big improvement in quality of the image. But my concern is that the algorithm used for filtering is not true bilinear filtering of samples. For sampling texture coordinates on the edge of a texel, we should also use samples from adjacent texels. We might not be seeing these problems in the test case you've developed, but we can hit them in some real world application. Anuj Phogat proposed v3: Algorithm used for filtering now assumes a rectangular grid of samples roughly corresponding to sample locations. It also tests the boundary conditions on the texture edges. So, Now we do a true bilinear filtering of samples. Piglit tests to verify the implementation can be found at: https://github.com/aphogat/piglit.git Branch: blit-3 Error conditions test: ext_framebuffer_multisample-negative-blit-scaled Accuracy test: ext_framebuffer_multisample-blit-scaled-glsl Visual quality test: ext_framebuffer_multisample-blit-scaled Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> --- src/mesa/drivers/dri/intel/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 5cb2fa3..23bc757 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -94,6 +94,7 @@ intelInitExtensions(struct gl_context *ctx) if (intel->gen >= 6) { ctx->Extensions.EXT_framebuffer_multisample = true; ctx->Extensions.EXT_transform_feedback = true; + ctx->Extensions.EXT_framebuffer_multisample_blit_scaled = true; ctx->Extensions.ARB_blend_func_extended = !driQueryOptionb(&intel->optionCache, "disable_blend_func_extended"); ctx->Extensions.ARB_draw_buffers_blend = true; ctx->Extensions.ARB_ES3_compatibility = true; -- 1.8.1.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev