i965/gen10: Don't set Antialiasing Enable in 3DSTATE_RASTER if num_samples > 1
authorAnuj Phogat <anuj.phogat@gmail.com>
Thu, 26 Oct 2017 18:03:13 +0000 (11:03 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Fri, 3 Nov 2017 21:30:33 +0000 (14:30 -0700)
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/genX_state_upload.c

index ca081de2243fea3e90fa799de112ea7800cf3b59..453b8e4adda7214755f671444c8243674de3db30 100644 (file)
@@ -4362,6 +4362,16 @@ genX(upload_raster)(struct brw_context *brw)
       /* _NEW_LINE */
       raster.AntialiasingEnable = ctx->Line.SmoothFlag;
 
+#if GEN_GEN == 10
+      /* _NEW_BUFFERS
+       * Antialiasing Enable bit MUST not be set when NUM_MULTISAMPLES > 1.
+       */
+      const bool multisampled_fbo =
+         _mesa_geometric_samples(ctx->DrawBuffer) > 1;
+      if (multisampled_fbo)
+         raster.AntialiasingEnable = false;
+#endif
+
       /* _NEW_SCISSOR */
       raster.ScissorRectangleEnable = ctx->Scissor.EnableFlags;