Taken from the intel driver. The sample positions are actually a solution
to the 8 queens puzzle.  It gives more accurate and smoother AA.
---
 src/gallium/drivers/r600/evergreen_state.c |   18 +++++++++---------
 src/gallium/drivers/r600/r600_state.c      |    6 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c 
b/src/gallium/drivers/r600/evergreen_state.c
index 17b7e9d..ab9a7a5 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1723,16 +1723,16 @@ static void evergreen_emit_msaa_state(struct 
r600_context *rctx, int nr_samples)
        static unsigned max_dist_4x = 6;
        /* 8xMSAA */
        static uint32_t sample_locs_8x[] = {
-               FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2),
-               FILL_SREG( 6,  0, 0,  0, -5, 3,  4,  4),
-               FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2),
-               FILL_SREG( 6,  0, 0,  0, -5, 3,  4,  4),
-               FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2),
-               FILL_SREG( 6,  0, 0,  0, -5, 3,  4,  4),
-               FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2),
-               FILL_SREG( 6,  0, 0,  0, -5, 3,  4,  4),
+               FILL_SREG(-1,  1,  1,  5,  3, -5,  5,  3),
+               FILL_SREG(-7, -1, -3, -7,  7, -3, -5,  7),
+               FILL_SREG(-1,  1,  1,  5,  3, -5,  5,  3),
+               FILL_SREG(-7, -1, -3, -7,  7, -3, -5,  7),
+               FILL_SREG(-1,  1,  1,  5,  3, -5,  5,  3),
+               FILL_SREG(-7, -1, -3, -7,  7, -3, -5,  7),
+               FILL_SREG(-1,  1,  1,  5,  3, -5,  5,  3),
+               FILL_SREG(-7, -1, -3, -7,  7, -3, -5,  7),
        };
-       static unsigned max_dist_8x = 8;
+       static unsigned max_dist_8x = 7;
 
        struct radeon_winsys_cs *cs = rctx->cs;
        unsigned max_dist = 0;
diff --git a/src/gallium/drivers/r600/r600_state.c 
b/src/gallium/drivers/r600/r600_state.c
index 1a8d55e..607a89e 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -1587,10 +1587,10 @@ static void r600_emit_msaa_state(struct r600_context 
*rctx, int nr_samples)
        };
        static unsigned max_dist_4x = 6;
        static uint32_t sample_locs_8x[] = {
-               FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2),
-               FILL_SREG( 6,  0, 0,  0, -5, 3,  4,  4),
+               FILL_SREG(-1,  1,  1,  5,  3, -5,  5,  3),
+               FILL_SREG(-7, -1, -3, -7,  7, -3, -5,  7),
        };
-       static unsigned max_dist_8x = 8;
+       static unsigned max_dist_8x = 7;
 
        struct radeon_winsys_cs *cs = rctx->cs;
        unsigned max_dist = 0;
-- 
1.7.9.5

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to