lavapipe: lower mipmapPrecisionBits to 4
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 6 Aug 2021 10:04:18 +0000 (12:04 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 9 Aug 2021 06:27:10 +0000 (06:27 +0000)
Through some exhaustive searching, I've found that our log2 approximation
is precise to around 3.5 bits. And the squaring step should increase the
result with one bit, leaving us with 4.5 bits of precision.

Reporting the right mipmap precision fixes a few CTS-tests.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12238>

src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt
src/gallium/frontends/lavapipe/lvp_device.c

index 2d974d2..c62d538 100644 (file)
@@ -27,14 +27,5 @@ dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.r8g8b8a8_unorm.r1
 dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.r8g8b8a8_unorm.r16g16b16a16_unorm.linear_general_linear,Fail
 dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.r8g8b8a8_unorm.r16g16b16a16_unorm.optimal_general_linear,Fail
 dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.r8g8b8a8_unorm.r16g16b16a16_unorm.optimal_linear_linear,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.isampler2d_fragment,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1d_fixed_fragment,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1darray_float_fragment,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1dshadow_fragment,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler2d_fixed_fragment,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler2darray_fixed_fragment,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler2darrayshadow_fragment,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler2dshadow_fragment,Fail
-dEQP-VK.glsl.texture_functions.query.texturequerylod.usampler1darray_fragment,Fail
 dEQP-VK.rasterization.primitives.static_stipple.rectangular_line_strip_wide,Fail
 dEQP-VK.rasterization.primitives_multisample_4_bit.dynamic_stipple.line_strip_wide,Fail
index 42329c8..0a98731 100644 (file)
@@ -764,7 +764,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceProperties(VkPhysicalDevice phys
       .maxComputeWorkGroupSize = { block_size[0], block_size[1], block_size[2] },
       .subPixelPrecisionBits                    = pdevice->pscreen->get_param(pdevice->pscreen, PIPE_CAP_RASTERIZER_SUBPIXEL_BITS),
       .subTexelPrecisionBits                    = 8,
-      .mipmapPrecisionBits                      = 8,
+      .mipmapPrecisionBits                      = 4,
       .maxDrawIndexedIndexValue                 = UINT32_MAX,
       .maxDrawIndirectCount                     = UINT32_MAX,
       .maxSamplerLodBias                        = 16,