[Mesa-dev] [PATCH V2 2/2] i965/gen10: Don't set Antialiasing Enable in 3DSTATE_RASTER if num_samples > 1

Anuj Phogat anuj.phogat at gmail.com
Fri Oct 27 22:22:07 UTC 2017


V2: Use _NEW_BUFFERS in place of _NEW_MULTISAMPLE.
    Fix indentation.

Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Cc: Kenneth Graunke <kenneth at whitecape.org>
Cc: Matt Turner <mattst88 at gmail.com>
---
 src/mesa/drivers/dri/i965/genX_state_upload.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index 25240f01d9..65ec30833c 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -4363,6 +4363,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;
 
-- 
2.13.5



More information about the mesa-dev mailing list