summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-10-27 16:31:19 +0200
committerMarek Olšák <maraeo@gmail.com>2012-10-31 00:55:23 +0100
commitc0c26ddaef5b0eb56ee225e8e4492df5190dce0c (patch)
tree95f2cf210121ff1cfc9403bea8aa111839aa868b
parente73bf3b805de78299f1a652668ba4e6eab9bac94 (diff)
r600g: use better sample positions for 8x MSAA
Taken from the intel driver. The sample positions are actually a solution to the 8 queens puzzle. It gives more accurate and smoother AA.
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c18
-rw-r--r--src/gallium/drivers/r600/r600_state.c6
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 17b7e9d2c72..ab9a7a58603 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)
1723 static unsigned max_dist_4x = 6; 1723 static unsigned max_dist_4x = 6;
1724 /* 8xMSAA */ 1724 /* 8xMSAA */
1725 static uint32_t sample_locs_8x[] = { 1725 static uint32_t sample_locs_8x[] = {
1726 FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2), 1726 FILL_SREG(-1, 1, 1, 5, 3, -5, 5, 3),
1727 FILL_SREG( 6, 0, 0, 0, -5, 3, 4, 4), 1727 FILL_SREG(-7, -1, -3, -7, 7, -3, -5, 7),
1728 FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2), 1728 FILL_SREG(-1, 1, 1, 5, 3, -5, 5, 3),
1729 FILL_SREG( 6, 0, 0, 0, -5, 3, 4, 4), 1729 FILL_SREG(-7, -1, -3, -7, 7, -3, -5, 7),
1730 FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2), 1730 FILL_SREG(-1, 1, 1, 5, 3, -5, 5, 3),
1731 FILL_SREG( 6, 0, 0, 0, -5, 3, 4, 4), 1731 FILL_SREG(-7, -1, -3, -7, 7, -3, -5, 7),
1732 FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2), 1732 FILL_SREG(-1, 1, 1, 5, 3, -5, 5, 3),
1733 FILL_SREG( 6, 0, 0, 0, -5, 3, 4, 4), 1733 FILL_SREG(-7, -1, -3, -7, 7, -3, -5, 7),
1734 }; 1734 };
1735 static unsigned max_dist_8x = 8; 1735 static unsigned max_dist_8x = 7;
1736 1736
1737 struct radeon_winsys_cs *cs = rctx->cs; 1737 struct radeon_winsys_cs *cs = rctx->cs;
1738 unsigned max_dist = 0; 1738 unsigned max_dist = 0;
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 1a8d55e8d36..607a89e30aa 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)
1587 }; 1587 };
1588 static unsigned max_dist_4x = 6; 1588 static unsigned max_dist_4x = 6;
1589 static uint32_t sample_locs_8x[] = { 1589 static uint32_t sample_locs_8x[] = {
1590 FILL_SREG(-2, -5, 3, -4, -1, 5, -6, -2), 1590 FILL_SREG(-1, 1, 1, 5, 3, -5, 5, 3),
1591 FILL_SREG( 6, 0, 0, 0, -5, 3, 4, 4), 1591 FILL_SREG(-7, -1, -3, -7, 7, -3, -5, 7),
1592 }; 1592 };
1593 static unsigned max_dist_8x = 8; 1593 static unsigned max_dist_8x = 7;
1594 1594
1595 struct radeon_winsys_cs *cs = rctx->cs; 1595 struct radeon_winsys_cs *cs = rctx->cs;
1596 unsigned max_dist = 0; 1596 unsigned max_dist = 0;