diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index a006740224e..89343eb3b9e 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1099,7 +1099,7 @@ fs_visitor::emit_general_interpolation(ir_variable *ir) */ struct brw_reg interp = interp_reg(location, k); emit_linterp(attr, fs_reg(interp), interpolation_mode, - ir->centroid, + ir->centroid && !c->key.persample_shading, c->key.persample_shading); if (brw->needs_unlit_centroid_workaround && ir->centroid) { diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 464e826ec71..a350ebddcb4 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -61,7 +61,8 @@ brw_compute_barycentric_interp_modes(struct brw_context *brw, for (attr = 0; attr < VARYING_SLOT_MAX; ++attr) { enum glsl_interp_qualifier interp_qualifier = fprog->InterpQualifier[attr]; - bool is_centroid = fprog->IsCentroid & BITFIELD64_BIT(attr); + bool is_centroid = (fprog->IsCentroid & BITFIELD64_BIT(attr)) && + !persample_shading; bool is_sample = persample_shading; bool is_gl_Color = attr == VARYING_SLOT_COL0 || attr == VARYING_SLOT_COL1; |