[Mesa-stable] [Mesa-dev] [PATCH] i965: Do not set bilinear_filter flag in case of multisample blits

Paul Berry stereotype441 at gmail.com
Sun Oct 27 07:42:06 PDT 2013


On 18 October 2013 17:24, Anuj Phogat <anuj.phogat at gmail.com> wrote:

> Setting bilinear_filter flag in case of multisample blits with
> GL_LINEAR filter causes incorrect behavior in translate_dst_to_src()
> function. This broke Modern Warfare (1, 2 and 3) on SNB, IVB and HSW.
>
> Tested on SNB and IVB, no Piglit regressions. Trace file of the game
> (taken with apitrace) works fine with this patch.
>
> Cc: mesa-stable at lists.freedesktop.org
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> Reported-by: Armin K <krejzi at email.com>
> ---
>  src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Paul Berry <stereotype441 at gmail.com>

BTW, I've taken the liberty of writing some piglit tests to make sure we
don't regress this functionality again in the future.  I'll send them out
to the piglit list shortly.


>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> index 2b94e2d..7e436f7 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> @@ -2171,7 +2171,7 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct
> brw_context *brw,
>     wm_prog_key.x_scale = 2.0;
>     wm_prog_key.y_scale = src_mt->num_samples / 2.0;
>
> -   if (filter == GL_LINEAR)
> +   if (filter == GL_LINEAR && src.num_samples <= 1 && dst.num_samples <=
> 1)
>        wm_prog_key.bilinear_filter = true;
>
>     /* The render path must be configured to use the same number of
> samples as
> --
> 1.8.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20131027/e40d66fb/attachment.html>


More information about the mesa-stable mailing list