mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 19:40:10 +01:00
i965/Gen7: Allow CMS layout for multisample textures
Now that all the pieces are in place, this should provide a nice performance boost for apps using multisample textures. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
3122c2421a
commit
83b83fb984
1 changed files with 1 additions and 17 deletions
|
|
@ -99,23 +99,7 @@ compute_msaa_layout(struct brw_context *brw, gl_format format, GLenum target)
|
||||||
assert(brw->gen == 7);
|
assert(brw->gen == 7);
|
||||||
return INTEL_MSAA_LAYOUT_UMS;
|
return INTEL_MSAA_LAYOUT_UMS;
|
||||||
} else {
|
} else {
|
||||||
/* For now, if we're going to be texturing from this surface,
|
return INTEL_MSAA_LAYOUT_CMS;
|
||||||
* force UMS, so that the shader doesn't have to do different things
|
|
||||||
* based on whether there's a multisample control surface needing sampled first.
|
|
||||||
* We can't just blindly read the MCS surface in all cases because:
|
|
||||||
*
|
|
||||||
* From the Ivy Bridge PRM, Vol4 Part1 p77 ("MCS Enable"):
|
|
||||||
*
|
|
||||||
* If this field is disabled and the sampling engine <ld_mcs> message
|
|
||||||
* is issued on this surface, the MCS surface may be accessed. Software
|
|
||||||
* must ensure that the surface is defined to avoid GTT errors.
|
|
||||||
*/
|
|
||||||
if (target == GL_TEXTURE_2D_MULTISAMPLE ||
|
|
||||||
target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) {
|
|
||||||
return INTEL_MSAA_LAYOUT_UMS;
|
|
||||||
} else {
|
|
||||||
return INTEL_MSAA_LAYOUT_CMS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue