From 691c55f3560e5b8b9db9ecd2c089f13b41ec684f Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 9 Jul 2012 20:05:41 -0700 Subject: i965/msaa: Control multisampling behaviour via the visual. Previously, we used the number of samples in draw buffer 0 to determine whether to set up the 3D pipeline for multisampling. Using the visual is cleaner, and has the benefit of working properly when there is no color buffer. Fixes all piglit tests "EXT_framebuffer_multisample/no-color" on Gen7. On Gen6, the "depth-computed" variants of these tests still fail; this will be addresed in a later patch. Reviewed-by: Chad Versace --- src/mesa/drivers/dri/i965/gen7_sf_state.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/i965/gen7_sf_state.c') diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c index b1fe654..2d258d2 100644 --- a/src/mesa/drivers/dri/i965/gen7_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c @@ -161,9 +161,7 @@ upload_sf_state(struct brw_context *brw) float point_size; /* _NEW_BUFFERS */ bool render_to_fbo = _mesa_is_user_fbo(brw->intel.ctx.DrawBuffer); - bool multisampled_fbo = false; - if (ctx->DrawBuffer->_ColorDrawBuffers[0]) - multisampled_fbo = ctx->DrawBuffer->_ColorDrawBuffers[0]->NumSamples > 0; + bool multisampled_fbo = ctx->DrawBuffer->Visual.sampleBuffers; dw1 = GEN6_SF_STATISTICS_ENABLE | GEN6_SF_VIEWPORT_TRANSFORM_ENABLE; -- cgit v1.1