panvk: Fix the maximum sampler LOD bias

The LOD bias in encoded in a signed 8.8 fixed point, meaning the valid
range is [-128,+127.966] not [-255,+255]. Since .maxSamplerLodBias
encodes an absolute value not a range, we make it [-127.996,+127,996].

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
This commit is contained in:
Boris Brezillon 2024-10-18 19:05:01 +02:00 committed by Marge Bot
parent d5581b1124
commit c80e182019

View file

@ -513,7 +513,7 @@ get_device_properties(const struct panvk_instance *instance,
.maxDrawIndexedIndexValue = UINT32_MAX,
/* Make it one for now. */
.maxDrawIndirectCount = 1,
.maxSamplerLodBias = 255,
.maxSamplerLodBias = (float)INT16_MAX / 256.0f,
.maxSamplerAnisotropy = 16,
.maxViewports = 1,
/* Same as the framebuffer limit. */