<div dir="auto">Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 16, 2018, 12:33 PM Nicolai Hähnle <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com" target="_blank" rel="noreferrer">nicolai.haehnle@amd.com</a>><br>
<br>
We read 4 values out of sample_locs_8x, so make sure the array is<br>
big enough.<br>
<br>
Fixes: ac76aeef20 ("radeonsi: switch back to standard DX sample positions")<br>
---<br>
src/gallium/drivers/radeonsi/si_state_msaa.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/gallium/drivers/radeonsi/si_state_msaa.c b/src/gallium/drivers/radeonsi/si_state_msaa.c<br>
index b741bcadec8..e6d97fe6727 100644<br>
--- a/src/gallium/drivers/radeonsi/si_state_msaa.c<br>
+++ b/src/gallium/drivers/radeonsi/si_state_msaa.c<br>
@@ -94,20 +94,24 @@ static const uint64_t centroid_priority_2x = 0x1010101010101010ull;<br>
<br>
/* 4x MSAA (the positions are sorted for EQAA) */<br>
static const uint32_t sample_locs_4x =<br>
FILL_SREG(-2,-6, 2, 6, -6, 2, 6,-2);<br>
static const uint64_t centroid_priority_4x = 0x3210321032103210ull;<br>
<br>
/* 8x MSAA (the positions are sorted for EQAA) */<br>
static const uint32_t sample_locs_8x[] = {<br>
FILL_SREG(-3,-5, 5, 1, -1, 3, 7,-7),<br>
FILL_SREG(-7,-1, 3, 7, -5, 5, 1,-3),<br>
+ /* The following are unused by hardware, but we emit them to IBs<br>
+ * instead of multiple SET_CONTEXT_REG packets. */<br>
+ 0,<br>
+ 0,<br>
};<br>
static const uint64_t centroid_priority_8x = 0x3546012735460127ull;<br>
<br>
/* 16x MSAA (the positions are sorted for EQAA) */<br>
static const uint32_t sample_locs_16x[] = {<br>
FILL_SREG(-5,-2, 5, 3, -2, 6, 3,-5),<br>
FILL_SREG(-4,-6, 1, 1, -6, 4, 7,-4),<br>
FILL_SREG(-1,-3, 6, 7, -3, 2, 0,-7),<br>
FILL_SREG(-7,-8, 2, 5, -8, 0, 4,-1),<br>
};<br>
-- <br>
2.19.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank" rel="noreferrer">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>