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: 9fbf6b2abf ("lavapipe: implement VK_EXT_line_rasterization")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12277>
This commit is contained in:
Erik Faye-Lund 2021-08-09 08:40:42 +02:00 committed by Marge Bot
parent 0a4c4f4459
commit a16f3963d3
1 changed files with 3 additions and 1 deletions

View File

@ -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: {