<div dir="ltr"><div>Thanks!<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 18, 2016 at 4:44 AM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch improves pass rate of dEQP-VK.texture.explicit_lod.<wbr>2d.sizes.*<br>
from 68.0% (98/144) to 83.3% (120/144) by enabling sampler address<br>
rounding mode when the selected filter is not nearest, which is the same<br>
thing we do for OpenGL.<br>
<br>
These tests check texture filtering for various texture sizes and mipmap<br>
levels. The failures (without this patch) affect cases where the target<br>
texture has odd dimensions (like 57x35) and either the Min or the Mag filter<br>
is not nearest.<br>
<br>
---<br>
<br>
I think this patch should fix all the failed tests, but for some reason  it<br>
only fixes the subset where the MagFilter is not linear.<br>
<br>
 src/intel/vulkan/genX_state.c | 17 +++++++++++------<br>
 1 file changed, 11 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/genX_state.<wbr>c b/src/intel/vulkan/genX_state.<wbr>c<br>
index be1bd78..4122395 100644<br>
--- a/src/intel/vulkan/genX_state.<wbr>c<br>
+++ b/src/intel/vulkan/genX_state.<wbr>c<br>
@@ -167,6 +167,11 @@ VkResult genX(CreateSampler)(<br>
    uint32_t border_color_offset = device->border_colors.offset +<br>
                                   pCreateInfo->borderColor * 64;<br>
<br>
+   bool enable_min_filter_addr_<wbr>rounding =<br>
+      pCreateInfo->minFilter != VK_FILTER_NEAREST;<br>
+   bool enable_mag_filter_addr_<wbr>rounding =<br>
+      pCreateInfo->magFilter != VK_FILTER_NEAREST;<br>
+<br>
    struct GENX(SAMPLER_STATE) sampler_state = {<br>
       .SamplerDisable = false,<br>
       .TextureBorderColorMode = DX10OGL,<br>
@@ -202,12 +207,12 @@ VkResult genX(CreateSampler)(<br>
 #endif<br>
<br>
       .MaximumAnisotropy = vk_to_gen_max_anisotropy(<wbr>pCreateInfo->maxAnisotropy),<br>
-      .<wbr>RAddressMinFilterRoundingEnabl<wbr>e = 0,<br>
-      .<wbr>RAddressMagFilterRoundingEnabl<wbr>e = 0,<br>
-      .<wbr>VAddressMinFilterRoundingEnabl<wbr>e = 0,<br>
-      .<wbr>VAddressMagFilterRoundingEnabl<wbr>e = 0,<br>
-      .<wbr>UAddressMinFilterRoundingEnabl<wbr>e = 0,<br>
-      .<wbr>UAddressMagFilterRoundingEnabl<wbr>e = 0,<br>
+      .<wbr>RAddressMinFilterRoundingEnabl<wbr>e = enable_min_filter_addr_<wbr>rounding,<br>
+      .<wbr>RAddressMagFilterRoundingEnabl<wbr>e = enable_mag_filter_addr_<wbr>rounding,<br>
+      .<wbr>VAddressMinFilterRoundingEnabl<wbr>e = enable_min_filter_addr_<wbr>rounding,<br>
+      .<wbr>VAddressMagFilterRoundingEnabl<wbr>e = enable_mag_filter_addr_<wbr>rounding,<br>
+      .<wbr>UAddressMinFilterRoundingEnabl<wbr>e = enable_min_filter_addr_<wbr>rounding,<br>
+      .<wbr>UAddressMagFilterRoundingEnabl<wbr>e = enable_mag_filter_addr_<wbr>rounding,<br>
       .TrilinearFilterQuality = 0,<br>
       .NonnormalizedCoordinateEnable = pCreateInfo-><wbr>unnormalizedCoordinates,<br>
       .TCXAddressControlMode = vk_to_gen_tex_address[<wbr>pCreateInfo->addressModeU],<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<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>
</font></span></blockquote></div><br></div>