Module: Mesa Branch: staging/21.2 Commit: 12f77679a690333b982c28bbe31eb02aba62457d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=12f77679a690333b982c28bbe31eb02aba62457d
Author: Erik Faye-Lund <[email protected]> Date: Mon Aug 9 08:40:42 2021 +0200 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12277> (cherry picked from commit a16f3963d36e66e6610c98083595e66712fbb296) --- .pick_status.json | 2 +- src/gallium/frontends/lavapipe/lvp_device.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 986b8fe41c0..117339389b2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -139,7 +139,7 @@ "description": "lavapipe: fix reported subpixel precision for lines", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "9fbf6b2abff19dc4c3e942569737ac3e67302e1d" }, diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 58ea8238a5d..a575ab167cb 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -957,7 +957,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_SUBGROUP_PROPERTIES: {
