Mesa (master): i965: Thwack multisample enable bit in 3DSTATE_RASTER.

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Feb 19 23:41:06 UTC 2014


Module: Mesa
Branch: master
Commit: a3d70580b52c37036e162a976efd9e038615e6d7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a3d70580b52c37036e162a976efd9e038615e6d7

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Feb 10 18:17:10 2014 -0800

i965: Thwack multisample enable bit in 3DSTATE_RASTER.

The meaning and effects of this bit are surprisingly complicated.

See Rasterization > Windower > Multisampling > Multisample ModesState.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>

---

 src/mesa/drivers/dri/i965/brw_defines.h   |    1 +
 src/mesa/drivers/dri/i965/gen8_sf_state.c |    4 ++++
 2 files changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index dea0940..1cbbe67 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -1707,6 +1707,7 @@ enum brw_message_target {
 # define GEN8_RASTER_CULL_FRONT                         (2 << 16)
 # define GEN8_RASTER_CULL_BACK                          (3 << 16)
 # define GEN8_RASTER_SMOOTH_POINT_ENABLE                (1 << 13)
+# define GEN8_RASTER_API_MULTISAMPLE_ENABLE             (1 << 12)
 # define GEN8_RASTER_LINE_AA_ENABLE                     (1 << 2)
 # define GEN8_RASTER_SCISSOR_ENABLE                     (1 << 1)
 # define GEN8_RASTER_VIEWPORT_Z_CLIP_TEST_ENABLE        (1 << 0)
diff --git a/src/mesa/drivers/dri/i965/gen8_sf_state.c b/src/mesa/drivers/dri/i965/gen8_sf_state.c
index a5cd9f8..b31b17e 100644
--- a/src/mesa/drivers/dri/i965/gen8_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_sf_state.c
@@ -209,6 +209,9 @@ upload_raster(struct brw_context *brw)
    if (ctx->Point.SmoothFlag)
       dw1 |= GEN8_RASTER_SMOOTH_POINT_ENABLE;
 
+   if (ctx->Multisample._Enabled)
+      dw1 |= GEN8_RASTER_API_MULTISAMPLE_ENABLE;
+
    if (ctx->Polygon.OffsetFill)
       dw1 |= GEN6_SF_GLOBAL_DEPTH_OFFSET_SOLID;
 
@@ -274,6 +277,7 @@ const struct brw_tracked_state gen8_raster_state = {
    .dirty = {
       .mesa  = _NEW_BUFFERS |
                _NEW_LINE |
+               _NEW_MULTISAMPLE |
                _NEW_POINT |
                _NEW_POLYGON |
                _NEW_SCISSOR |




More information about the mesa-commit mailing list