On 02.05.2018 06:13, Marek Olšák wrote:
From: Marek Olšák <[email protected]>

This results in better 16x and 8x quality when using these locations.
Verified with the piglit MSAA accuracy test.

How did you come up with those? :)

Reviewed-by: Nicolai Hähnle <[email protected]>


---
  src/gallium/drivers/radeonsi/si_state_msaa.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_msaa.c 
b/src/gallium/drivers/radeonsi/si_state_msaa.c
index b6504d53a2a..5066c31319e 100644
--- a/src/gallium/drivers/radeonsi/si_state_msaa.c
+++ b/src/gallium/drivers/radeonsi/si_state_msaa.c
@@ -100,26 +100,26 @@ static const uint32_t sample_locs_8x[] = {
        FILL_SREG( 0, 0,   0, 0,   0, 0,   0, 0),
  };
  static const uint64_t centroid_priority_8x = 0x3542017635420176ull;
/* 4x and 16x MSAA
   * (the first 4 locations happen to be optimal for 4x MSAA, better than
   *  the standard DX 4x locations)
   */
  static const uint32_t sample_locs_4x_16x[] = {
        FILL_SREG(-5,-2,   5, 3,  -2, 6,   3,-5),
-       FILL_SREG(-7,-8,   1, 1,  -6, 4,   7,-4),
+       FILL_SREG(-6,-7,   1, 1,  -6, 4,   7,-3),
        FILL_SREG(-1,-3,   6, 7,  -3, 2,   0,-7),
        FILL_SREG(-4,-6,   2, 5,  -8, 0,   4,-1),
  };
  static const uint64_t centroid_priority_4x = 0x2310231023102310ull;
-static const uint64_t centroid_priority_16x = 0x497ec6b231d0fa85ull;
+static const uint64_t centroid_priority_16x = 0x49e7c6b231d0fa85ull;
static void si_get_sample_position(struct pipe_context *ctx, unsigned sample_count,
                                   unsigned sample_index, float *out_value)
  {
        const uint32_t *sample_locs;
switch (sample_count) {
        case 1:
        default:
                sample_locs = &sample_locs_1x;



--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to