aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 471833778d2..d09fe6dcb41 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -576,6 +576,19 @@ brw_render_target_supported(struct intel_context *intel,
rb->_BaseFormat != GL_RED) && _mesa_is_format_integer_color(format))
return false;
+ /* Under some conditions, MSAA is not supported for formats whose width is
+ * more than 64 bits.
+ */
+ if (rb->NumSamples > 0 && _mesa_get_format_bytes(format) > 8) {
+ /* Gen6: MSAA on >64 bit formats is unsupported. */
+ if (intel->gen <= 6)
+ return false;
+
+ /* Gen7: 8x MSAA on >64 bit formats is unsupported. */
+ if (rb->NumSamples >= 8)
+ return false;
+ }
+
return brw->format_supported_as_render_target[format];
}