Mesa (master): i965: Do not set bilinear_filter flag in case of multisample blits

Anuj Phogat aphogat at kemper.freedesktop.org
Mon Oct 28 16:41:03 UTC 2013


Module: Mesa
Branch: master
Commit: f278d49c4bcfedbda10cb224cb251e3755e88288
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f278d49c4bcfedbda10cb224cb251e3755e88288

Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Fri Oct 18 16:07:42 2013 -0700

i965: Do not set bilinear_filter flag in case of multisample blits

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.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69078
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>
Tested-by: Armin K <krejzi at email.com>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>

---

 src/mesa/drivers/dri/i965/brw_blorp_blit.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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




More information about the mesa-commit mailing list