Module: Mesa Branch: main Commit: dc7c1d989bd1b6966ca0ec0408b65686d3e92c11 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc7c1d989bd1b6966ca0ec0408b65686d3e92c11
Author: Juston Li <[email protected]> Date: Thu Aug 10 13:22:09 2023 -0700 radv: enable stippledBresenhamLines on GFX9 chips This isn't supposed to work nor does it match radeonsi but setting AUTO_RESET_CNTL=0 by default for GFX9 chips is what gets it passing linestrip CTS tests: dEQP-VK.rasterization.primitives.dynamic_stipple.bresenham_line_strip dEQP-VK.rasterization.primitives.dynamic_stipple_and_topology.bresenham_line_strip dEQP-VK.rasterization.primitives.dynamic_stipple_and_topology.bresenham_line_strip_wide dEQP-VK.rasterization.primitives.static_stipple.bresenham_line_strip Signed-off-by: Juston Li <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24623> --- src/amd/vulkan/radv_cmd_buffer.c | 4 +++- src/amd/vulkan/radv_physical_device.c | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index f3bc4a134f5..52926ff5ee4 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2211,7 +2211,9 @@ static void radv_emit_line_stipple(struct radv_cmd_buffer *cmd_buffer) { const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic; - uint32_t auto_reset_cntl = 2; + enum amd_gfx_level gfx_level = cmd_buffer->device->physical_device->rad_info.gfx_level; + /* GFX9 chips fail linestrip CTS tests unless this is set to 0 = no reset */ + uint32_t auto_reset_cntl = (gfx_level == GFX9) ? 0 : 2; if (radv_primitive_topology_is_line_list(d->vk.ia.primitive_topology)) auto_reset_cntl = 1; diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index 6b31daab971..7a5253f8b53 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -796,10 +796,7 @@ radv_physical_device_get_features(const struct radv_physical_device *pdevice, st .bresenhamLines = true, .smoothLines = true, .stippledRectangularLines = false, - /* FIXME: Some stippled Bresenham CTS fails on Vega10 - * but work on Raven. - */ - .stippledBresenhamLines = pdevice->rad_info.gfx_level != GFX9, + .stippledBresenhamLines = true, .stippledSmoothLines = false, /* VK_EXT_robustness2 */
