<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 29, 2016 at 12:32 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="gmail-">On Thu, Jul 28, 2016 at 6:31 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span><p dir="ltr"></p>
<p dir="ltr">On Jul 28, 2016 7:37 PM, "Anuj Phogat" <<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>> wrote:<br>
><br>
> Fixes the vulkan cts regression in test dEQP-VK.api.info.device.properties<br>
><br>
> Cc: Mark Janes <<a href="mailto:mark.a.janes@intel.com" target="_blank">mark.a.janes@intel.com</a>><br>
> Cc: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br>
> Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>><br>
> ---<br>
> src/intel/vulkan/anv_device.c | 6 +++---<br>
> 1 file changed, 3 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c<br>
> index c2c5153..9fd9683 100644<br>
> --- a/src/intel/vulkan/anv_device.c<br>
> +++ b/src/intel/vulkan/anv_device.c<br>
> @@ -524,9 +524,9 @@ void anv_GetPhysicalDeviceProperties(<br>
> .maxTexelOffset = 7,<br>
> .minTexelGatherOffset = -8,<br>
> .maxTexelGatherOffset = 7,<br>
> - .minInterpolationOffset = 0, /* FIXME */<br>
> - .maxInterpolationOffset = 0, /* FIXME */<br>
> - .subPixelInterpolationOffsetBits = 0, /* FIXME */<br>
> + .minInterpolationOffset = -0.5,<br>
> + .maxInterpolationOffset = 0.5,<br></p></span></blockquote></span></div></div></div></blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">Correction: maxInterpolationOffset = 0.4375</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">From Vulkan 1.0 spec:</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">"</div>If subPixelInterpolationOffsetBits is 4, this provides increments of (1/24) = 0.0625, and thus the range of supported interpolation offsets would be [-0.5, 0.4375].<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">"</div><span style="font-family:verdana,sans-serif"></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span><p dir="ltr">
> + .subPixelInterpolationOffsetBits = 4,</p>
</span><p dir="ltr">I looked and neither gen7_pipeline.c nor gen8_pipeline.c set the subpixel precision so we get a default of enum value 0 which is 8 bits. We should probably be explicitly setting it to something. I think 4 is probably fine but we should be seeing it.</p></blockquote></span><div><div style="font-family:verdana,sans-serif;font-size:small">I think you're talking about "Vertex Sub Pixel Precision Select" in 3DSTATE_SF. Yes, we are setting a default value of zero which is 8 bits in both OpenGL and Vulkan. This meets the minimum requirement of 4 bits for GL_SUBPIXEL_BITS. Yes, it'll be nicer to make it more obvious what we are setting here.</div><div style="font-family:verdana,sans-serif;font-size:small"><br></div><div><font face="verdana, sans-serif">The value we are defining in this patch is </font>subPixelInterpolationOffsetBits<span style="font-family:verdana,sans-serif"> (GL_FRAGMENT_INTERPOLATION_OFFSET_BITS in OpenGL). I found no option of setting it on Intel Hardware. I just replicated what we do in i965 and made the CTS test happy again.</span></div></div><div><span style="font-family:verdana,sans-serif"><br></span></div><div><span style="font-family:verdana,sans-serif">Looks unrelated but there is this another thing '</span><font face="verdana, sans-serif">viewportSubPixelBits' which is initialized to 13 in Vulkan but 0 (required min. value) in i965. Again found no option of setting on Intel hardware.So, a similar case to subPixelInterpolationOffsetBits.</font></div><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<p dir="ltr">As a side note, I think we could probably combine 3DSTATE_SF and 3DSTATE_RASTER setup between gen7 and gen8 (and move it to genX_pipeline_until.h). We'd probably have to do some #define trick like we did for 3DSTATE_SBE and 3DSTATE_SBE_SWIZ because the two packets are combined on gen7 and split on gen8.</p></blockquote></span><div><div style="font-family:verdana,sans-serif;font-size:small;display:inline">I'll look in to it.</div> </div><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div>
<p dir="ltr">> .maxFramebufferWidth = (1 << 14),<br>
> .maxFramebufferHeight = (1 << 14),<br>
> .maxFramebufferLayers = (1 << 10),<br>
> --<br>
> 2.5.5<br>
></p>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>