<div dir="ltr">LGTM<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 9, 2016 at 2:41 PM, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">V1: Add multisample positions (Nanley)<br>
</span>V2: Fix 8x sample positions to match OpenGL (Anuj)<br>
V3: Vulkan has standard sample locations. They need not be same as<br>
in OpenGL. (Anuj)<br>
<br>
Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
<span class="">---<br>
src/intel/vulkan/genX_<wbr>pipeline_util.h | 47 ++++++++++++++++++++++++++++++<wbr>+++++<br>
1 file changed, 47 insertions(+)<br>
<br>
diff --git a/src/intel/vulkan/genX_<wbr>pipeline_util.h b/src/intel/vulkan/genX_<wbr>pipeline_util.h<br>
</span>index d9d8ca4..64b89cd 100644<br>
--- a/src/intel/vulkan/genX_<wbr>pipeline_util.h<br>
+++ b/src/intel/vulkan/genX_<wbr>pipeline_util.h<br>
@@ -475,6 +475,7 @@ emit_ms_state(struct anv_pipeline *pipeline,<br>
<span class=""> anv_batch_emit(&pipeline-><wbr>batch, GENX(3DSTATE_MULTISAMPLE), ms) {<br>
ms.NumberofMultisamples = log2_samples;<br>
<br>
+#if GEN_GEN >= 8<br>
/* The PRM says that this bit is valid only for DX9:<br>
*<br>
* SW can choose to set this bit only for DX9 API. DX10/OGL API's<br>
</span>@@ -482,6 +483,52 @@ emit_ms_state(struct anv_pipeline *pipeline,<br>
<div><div class="h5"> */<br>
ms.PixelPositionOffsetEnable = false;<br>
ms.PixelLocation = CENTER;<br>
+#else<br>
+ ms.PixelLocation = PIXLOC_CENTER;<br>
+<br>
+ switch (samples) {<br>
+ case 1:<br>
+ ms.Sample0XOffset = 0.5;<br>
+ ms.Sample0YOffset = 0.5;<br>
+ break;<br>
+ case 2:<br>
+ ms.Sample0XOffset = 0.25;<br>
+ ms.Sample0YOffset = 0.25;<br>
+ ms.Sample1XOffset = 0.75;<br>
+ ms.Sample1YOffset = 0.75;<br>
+ break;<br>
+ case 4:<br>
+ ms.Sample0XOffset = 0.375;<br>
+ ms.Sample0YOffset = 0.125;<br>
+ ms.Sample1XOffset = 0.875;<br>
+ ms.Sample1YOffset = 0.375;<br>
+ ms.Sample2XOffset = 0.125;<br>
+ ms.Sample2YOffset = 0.625;<br>
+ ms.Sample3XOffset = 0.625;<br>
+ ms.Sample3YOffset = 0.875;<br>
+ break;<br>
+ case 8:<br>
</div></div>+ ms.Sample0XOffset = 0.5625;<br>
+ ms.Sample0YOffset = 0.3125;<br>
+ ms.Sample1XOffset = 0.4375;<br>
+ ms.Sample1YOffset = 0.6875;<br>
+ ms.Sample2XOffset = 0.8125;<br>
+ ms.Sample2YOffset = 0.5625;<br>
+ ms.Sample3XOffset = 0.3125;<br>
+ ms.Sample3YOffset = 0.1875;<br>
+ ms.Sample4XOffset = 0.1875;<br>
+ ms.Sample4YOffset = 0.8125;<br>
+ ms.Sample5XOffset = 0.0625;<br>
+ ms.Sample5YOffset = 0.4375;<br>
+ ms.Sample6XOffset = 0.6875;<br>
+ ms.Sample6YOffset = 0.9375;<br>
+ ms.Sample7XOffset = 0.9375;<br>
+ ms.Sample7YOffset = 0.0625;<br>
<div class="HOEnZb"><div class="h5">+ break;<br>
+ default:<br>
+ break;<br>
+ }<br>
+#endif<br>
}<br>
<br>
anv_batch_emit(&pipeline-><wbr>batch, GENX(3DSTATE_SAMPLE_MASK), sm) {<br>
--<br>
2.5.5<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>