From a16f3963d36e66e6610c98083595e66712fbb296 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 9 Aug 2021 08:40:42 +0200 Subject: [PATCH] lavapipe: fix reported subpixel precision for lines We have no reason to report a subpixel precision of 4 for lines; in fact LLVMpipe uses 8 subpixel bits for lines, similar to other primitives. But let's use the pipe-cap for this instead of hard-coding it. Fixes: 9fbf6b2abff ("lavapipe: implement VK_EXT_line_rasterization") Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 2c444efc887..36c7facfb6f 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -978,7 +978,9 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceProperties2( case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT: { VkPhysicalDeviceLineRasterizationPropertiesEXT *properties = (VkPhysicalDeviceLineRasterizationPropertiesEXT *)ext; - properties->lineSubPixelPrecisionBits = 4; + properties->lineSubPixelPrecisionBits = + pdevice->pscreen->get_param(pdevice->pscreen, + PIPE_CAP_RASTERIZER_SUBPIXEL_BITS); break; } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: {