Mesa (main): lavapipe: lower mipmapPrecisionBits to 4

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 06:42:10 UTC 2021


Module: Mesa
Branch: main
Commit: 7d3ab96f39c08fe303cd5b1f428b4bfbef8c27ab
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d3ab96f39c08fe303cd5b1f428b4bfbef8c27ab

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri Aug  6 12:04:18 2021 +0200

lavapipe: lower mipmapPrecisionBits to 4

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 at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12238>

---

 src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt | 9 ---------
 src/gallium/frontends/lavapipe/lvp_device.c          | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt b/src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt
index 2d974d2a7c0..c62d5385a26 100644
--- a/src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt
+++ b/src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt
@@ -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
diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c
index 42329c8f4a2..0a987311967 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -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,



More information about the mesa-commit mailing list