diff options
author | Paul Berry <[email protected]> | 2012-07-09 20:05:41 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-07-24 14:52:57 -0700 |
commit | 691c55f3560e5b8b9db9ecd2c089f13b41ec684f (patch) | |
tree | 70529f8ccb8ac44a81e5ce9c17d16a3fe3f32848 /src/mesa/drivers/dri/i965/gen7_sf_state.c | |
parent | 48fdfbcb58929f1c20cb21190846faa388b1abba (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_sf_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_sf_state.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c index b1fe65478a9..2d258d2f1be 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; |