aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen7_blorp.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-07-03 11:36:39 -0700
committerPaul Berry <[email protected]>2012-07-11 15:14:49 -0700
commit7b3263af696e504ec68b91b0ce128d46a0691dce (patch)
tree049f5d9958c53e0c9eb8d9ea9e79da38ba657e18 /src/mesa/drivers/dri/i965/gen7_blorp.cpp
parent0ba813506d770ead7eb181fb2bf48d5a408fe0ea (diff)
i965/msaa: Set SURFACE_STATE properly when CMS MSAA is in use.
When a buffer using Gen7's CMS MSAA layout is bound to a texture or a render target, the SURFACE_STATE structure needs to point to the MCS buffer and to indicate its pitch. This patch updates the functions that emit SURFACE_STATE to handle CMS layout properly. Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_blorp.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/gen7_blorp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
index ec6312078b7..f087dbdc66a 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
@@ -181,6 +181,10 @@ gen7_blorp_emit_surface_state(struct brw_context *brw,
surf->ss3.pitch = pitch_bytes - 1;
gen7_set_surface_num_multisamples(surf, surface->num_samples);
+ if (surface->msaa_layout == INTEL_MSAA_LAYOUT_CMS) {
+ gen7_set_surface_mcs_info(brw, surf, wm_surf_offset,
+ surface->mt->mcs_mt, is_render_target);
+ }
if (intel->is_haswell) {
surf->ss7.shader_chanel_select_r = HSW_SCS_RED;